diff options
author | wxiaoguang <wxiaoguang@gmail.com> | 2023-08-26 10:44:00 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-26 10:44:00 +0800 |
commit | 4fdb09de588fb1ff32184411df80d5d59333b94c (patch) | |
tree | 5fb304d5be73ce7a4e6e0f29b95a7b91b13730d1 /templates/org | |
parent | 576644d81555cfcd7c865d444285cad64cc0b9ec (diff) | |
download | gitea-4fdb09de588fb1ff32184411df80d5d59333b94c.tar.gz gitea-4fdb09de588fb1ff32184411df80d5d59333b94c.zip |
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>
Diffstat (limited to 'templates/org')
-rw-r--r-- | templates/org/create.tmpl | 6 | ||||
-rw-r--r-- | templates/org/settings/options.tmpl | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/templates/org/create.tmpl b/templates/org/create.tmpl index 7e988ba0c7..966150aa93 100644 --- a/templates/org/create.tmpl +++ b/templates/org/create.tmpl @@ -19,15 +19,15 @@ <span class="inline required field"><label for="visibility">{{.locale.Tr "org.settings.visibility"}}</label></span> <div class="inline-grouped-list"> <div class="ui radio checkbox"> - <input class="enable-system-radio" tabindex="0" name="visibility" type="radio" value="0" {{if .DefaultOrgVisibilityMode.IsPublic}}checked{{end}}> + <input class="enable-system-radio" name="visibility" type="radio" value="0" {{if .DefaultOrgVisibilityMode.IsPublic}}checked{{end}}> <label>{{.locale.Tr "org.settings.visibility.public"}}</label> </div> <div class="ui radio checkbox"> - <input class="enable-system-radio" tabindex="0" name="visibility" type="radio" value="1" {{if .DefaultOrgVisibilityMode.IsLimited}}checked{{end}}> + <input class="enable-system-radio" name="visibility" type="radio" value="1" {{if .DefaultOrgVisibilityMode.IsLimited}}checked{{end}}> <label>{{.locale.Tr "org.settings.visibility.limited"}}</label> </div> <div class="ui radio checkbox"> - <input class="enable-system-radio" tabindex="0" name="visibility" type="radio" value="2" {{if .DefaultOrgVisibilityMode.IsPrivate}}checked{{end}}> + <input class="enable-system-radio" name="visibility" type="radio" value="2" {{if .DefaultOrgVisibilityMode.IsPrivate}}checked{{end}}> <label>{{.locale.Tr "org.settings.visibility.private"}}</label> </div> </div> diff --git a/templates/org/settings/options.tmpl b/templates/org/settings/options.tmpl index 03827e4c3f..ecc269481d 100644 --- a/templates/org/settings/options.tmpl +++ b/templates/org/settings/options.tmpl @@ -40,19 +40,19 @@ <label for="visibility">{{.locale.Tr "org.settings.visibility"}}</label> <div class="field"> <div class="ui radio checkbox"> - <input class="enable-system-radio" tabindex="0" name="visibility" type="radio" value="0" {{if eq .CurrentVisibility 0}}checked{{end}}> + <input class="enable-system-radio" name="visibility" type="radio" value="0" {{if eq .CurrentVisibility 0}}checked{{end}}> <label>{{.locale.Tr "org.settings.visibility.public"}}</label> </div> </div> <div class="field"> <div class="ui radio checkbox"> - <input class="enable-system-radio" tabindex="0" name="visibility" type="radio" value="1" {{if eq .CurrentVisibility 1}}checked{{end}}> + <input class="enable-system-radio" name="visibility" type="radio" value="1" {{if eq .CurrentVisibility 1}}checked{{end}}> <label>{{.locale.Tr "org.settings.visibility.limited"}}</label> </div> </div> <div class="field"> <div class="ui radio checkbox"> - <input class="enable-system-radio" tabindex="0" name="visibility" type="radio" value="2" {{if eq .CurrentVisibility 2}}checked{{end}}> + <input class="enable-system-radio" name="visibility" type="radio" value="2" {{if eq .CurrentVisibility 2}}checked{{end}}> <label>{{.locale.Tr "org.settings.visibility.private"}}</label> </div> </div> |