1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-22 18:28:37 +00:00

Fix incorrect "tabindex" attributes (#26733)

Fix #26731

Almost all "tabindex" in code are incorrect.

1. All "input/button" by default are focusable, so no need to use "tabindex=0"
2. All "div/span" by default are not focusable, so no need to use "tabindex=-1"
3. All "dropdown" are focusable by framework, so no need to use "tabindex"
4. Some tabindex values are incorrect (eg: `new_form.tmpl`), so remove them

Co-authored-by: Giteabot <teabot@gitea.io>
This commit is contained in:
wxiaoguang
2023-08-26 10:44:00 +08:00
committed by GitHub
parent 576644d815
commit 4fdb09de58
11 changed files with 54 additions and 55 deletions

View File

@@ -11,7 +11,7 @@
</span>
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
</span>
<div class="context user overflow menu" tabindex="-1">
<div class="context user overflow menu">
<div class="ui header">
{{.locale.Tr "home.switch_dashboard_context"}}
</div>
@@ -55,7 +55,7 @@
{{end}}
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
</span>
<div class="context user overflow menu" tabindex="-1">
<div class="context user overflow menu">
<div class="ui header">
{{.locale.Tr "home.filter_by_team_repositories"}}
</div>