Skip to content

Commit 85016af

Browse files
authored
Fixes accessibility behavior of Watching, Staring and Fork buttons (#22634)
Add tabindex to buttons of repository views.
1 parent b80538f commit 85016af

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Diff for: templates/repo/header.tmpl

+3-3
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
{{end}}
6969
<form method="post" action="{{$.RepoLink}}/action/{{if $.IsWatchingRepo}}un{{end}}watch?redirect_to={{$.Link}}">
7070
{{$.CsrfTokenHtml}}
71-
<div class="ui labeled button{{if not $.IsSigned}} tooltip{{end}}" tabindex="0"{{if not $.IsSigned}} data-content="{{$.locale.Tr "repo.watch_guest_user"}}" data-position="top center"{{end}}>
71+
<div class="ui labeled button{{if not $.IsSigned}} tooltip{{end}}"{{if not $.IsSigned}} data-content="{{$.locale.Tr "repo.watch_guest_user"}}" data-position="top center"{{end}}>
7272
<button type="submit" class="ui compact small basic button"{{if not $.IsSigned}} disabled{{end}}>
7373
{{if $.IsWatchingRepo}}{{svg "octicon-eye-closed" 16}}{{$.locale.Tr "repo.unwatch"}}{{else}}{{svg "octicon-eye"}}{{$.locale.Tr "repo.watch"}}{{end}}
7474
</button>
@@ -80,7 +80,7 @@
8080
{{if not $.DisableStars}}
8181
<form method="post" action="{{$.RepoLink}}/action/{{if $.IsStaringRepo}}un{{end}}star?redirect_to={{$.Link}}">
8282
{{$.CsrfTokenHtml}}
83-
<div class="ui labeled button{{if not $.IsSigned}} tooltip{{end}}" tabindex="0"{{if not $.IsSigned}} data-content="{{$.locale.Tr "repo.star_guest_user"}}" data-position="top center"{{end}}>
83+
<div class="ui labeled button{{if not $.IsSigned}} tooltip{{end}}"{{if not $.IsSigned}} data-content="{{$.locale.Tr "repo.star_guest_user"}}" data-position="top center"{{end}}>
8484
<button type="submit" class="ui compact small basic button"{{if not $.IsSigned}} disabled{{end}}>
8585
{{if $.IsStaringRepo}}{{svg "octicon-star-fill"}}{{$.locale.Tr "repo.unstar"}}{{else}}{{svg "octicon-star"}}{{$.locale.Tr "repo.star"}}{{end}}
8686
</button>
@@ -100,7 +100,7 @@
100100
{{else if and (not $.CanSignedUserFork) (eq (len $.UserAndOrgForks) 0)}}
101101
data-content="{{$.locale.Tr "repo.fork_from_self"}}"
102102
{{end}}
103-
data-position="top center" tabindex="0">
103+
data-position="top center">
104104
<a class="ui compact{{if $.ShowForkModal}} show-modal{{end}} small basic button"
105105
{{if not $.CanSignedUserFork}}
106106
{{if gt (len $.UserAndOrgForks) 1}}

0 commit comments

Comments
 (0)