Skip to content

Commit 0db7a0a

Browse files
fsologurengLoïc Dachary
authored and
Loïc Dachary
committed
Fixes accessibility behavior of Watching, Staring and Fork buttons (go-gitea#22634)
Add tabindex to buttons of repository views. (cherry picked from commit 68656353698ee89465dfb515bebfe7838567f159)
1 parent fb45bf2 commit 0db7a0a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

templates/repo/header.tmpl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
{{end}}
6767
<form method="post" action="{{$.RepoLink}}/action/{{if $.IsWatchingRepo}}un{{end}}watch?redirect_to={{$.Link}}">
6868
{{$.CsrfTokenHtml}}
69-
<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}}>
69+
<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}}>
7070
<button type="submit" class="ui compact small basic button"{{if not $.IsSigned}} disabled{{end}}>
7171
{{if $.IsWatchingRepo}}{{svg "octicon-eye-closed" 16}}{{$.locale.Tr "repo.unwatch"}}{{else}}{{svg "octicon-eye"}}{{$.locale.Tr "repo.watch"}}{{end}}
7272
</button>
@@ -78,7 +78,7 @@
7878
{{if not $.DisableStars}}
7979
<form method="post" action="{{$.RepoLink}}/action/{{if $.IsStaringRepo}}un{{end}}star?redirect_to={{$.Link}}">
8080
{{$.CsrfTokenHtml}}
81-
<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}}>
81+
<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}}>
8282
<button type="submit" class="ui compact small basic button"{{if not $.IsSigned}} disabled{{end}}>
8383
{{if $.IsStaringRepo}}{{svg "octicon-star-fill"}}{{$.locale.Tr "repo.unstar"}}{{else}}{{svg "octicon-star"}}{{$.locale.Tr "repo.star"}}{{end}}
8484
</button>
@@ -98,7 +98,7 @@
9898
{{else if and (not $.CanSignedUserFork) (eq (len $.UserAndOrgForks) 0)}}
9999
data-content="{{$.locale.Tr "repo.fork_from_self"}}"
100100
{{end}}
101-
data-position="top center" tabindex="0">
101+
data-position="top center">
102102
<a class="ui compact{{if $.ShowForkModal}} show-modal{{end}} small basic button"
103103
{{if not $.CanSignedUserFork}}
104104
{{if gt (len $.UserAndOrgForks) 1}}

0 commit comments

Comments
 (0)