summaryrefslogtreecommitdiffstats
path: root/templates/repo/create.tmpl
diff options
context:
space:
mode:
authorwxiaoguang <wxiaoguang@gmail.com>2023-08-26 10:44:00 +0800
committerGitHub <noreply@github.com>2023-08-26 10:44:00 +0800
commit4fdb09de588fb1ff32184411df80d5d59333b94c (patch)
tree5fb304d5be73ce7a4e6e0f29b95a7b91b13730d1 /templates/repo/create.tmpl
parent576644d81555cfcd7c865d444285cad64cc0b9ec (diff)
downloadgitea-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/repo/create.tmpl')
-rw-r--r--templates/repo/create.tmpl18
1 files changed, 9 insertions, 9 deletions
diff --git a/templates/repo/create.tmpl b/templates/repo/create.tmpl
index 2025cac566..0fcdf13f1e 100644
--- a/templates/repo/create.tmpl
+++ b/templates/repo/create.tmpl
@@ -77,40 +77,40 @@
<div class="inline field">
<label>{{.locale.Tr "repo.template.items"}}</label>
<div class="ui checkbox">
- <input name="git_content" type="checkbox" tabindex="0" {{if .git_content}}checked{{end}}>
+ <input name="git_content" type="checkbox" {{if .git_content}}checked{{end}}>
<label>{{.locale.Tr "repo.template.git_content"}}</label>
</div>
<div class="ui checkbox" {{if not .SignedUser.CanEditGitHook}}data-tooltip-content="{{.locale.Tr "repo.template.git_hooks_tooltip"}}"{{end}}>
- <input name="git_hooks" type="checkbox" tabindex="0" {{if .git_hooks}}checked{{end}}>
+ <input name="git_hooks" type="checkbox" {{if .git_hooks}}checked{{end}}>
<label>{{.locale.Tr "repo.template.git_hooks"}}</label>
</div>
</div>
<div class="inline field">
<label></label>
<div class="ui checkbox">
- <input name="webhooks" type="checkbox" tabindex="0" {{if .webhooks}}checked{{end}}>
+ <input name="webhooks" type="checkbox" {{if .webhooks}}checked{{end}}>
<label>{{.locale.Tr "repo.template.webhooks"}}</label>
</div>
<div class="ui checkbox">
- <input name="topics" type="checkbox" tabindex="0" {{if .topics}}checked{{end}}>
+ <input name="topics" type="checkbox" {{if .topics}}checked{{end}}>
<label>{{.locale.Tr "repo.template.topics"}}</label>
</div>
</div>
<div class="inline field">
<label></label>
<div class="ui checkbox">
- <input name="avatar" type="checkbox" tabindex="0" {{if .avatar}}checked{{end}}>
+ <input name="avatar" type="checkbox" {{if .avatar}}checked{{end}}>
<label>{{.locale.Tr "repo.template.avatar"}}</label>
</div>
<div class="ui checkbox">
- <input name="labels" type="checkbox" tabindex="0" {{if .labels}}checked{{end}}>
+ <input name="labels" type="checkbox" {{if .labels}}checked{{end}}>
<label>{{.locale.Tr "repo.template.issue_labels"}}</label>
</div>
</div>
<div class="inline field">
<label></label>
<div class="ui checkbox">
- <input name="protected_branch" type="checkbox" tabindex="0" {{if .protected_branch}}checked{{end}}>
+ <input name="protected_branch" type="checkbox" {{if .protected_branch}}checked{{end}}>
<label>{{.locale.Tr "repo.settings.protected_branch"}}</label>
</div>
</div>
@@ -176,7 +176,7 @@
</div>
<div class="inline field">
<div class="ui checkbox" id="auto-init">
- <input name="auto_init" type="checkbox" tabindex="0" {{if .auto_init}}checked{{end}}>
+ <input name="auto_init" type="checkbox" {{if .auto_init}}checked{{end}}>
<label>{{.locale.Tr "repo.auto_init"}}</label>
</div>
</div>
@@ -211,7 +211,7 @@
<div class="inline field">
<label>{{.locale.Tr "repo.template"}}</label>
<div class="ui checkbox">
- <input name="template" type="checkbox" tabindex="0">
+ <input name="template" type="checkbox">
<label>{{.locale.Tr "repo.template_helper"}}</label>
</div>
</div>