Skip to content

Commit 307ee2c

Browse files
wxiaoguangGiteaBot
andauthored
Fix incorrect "tabindex" attributes (#26733) (#26734)
Backport #26733 manually Co-authored-by: Giteabot <[email protected]>
1 parent 2f6c0e6 commit 307ee2c

File tree

11 files changed

+52
-52
lines changed

11 files changed

+52
-52
lines changed

templates/org/create.tmpl

+3-3
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,15 @@
1919
<span class="inline required field"><label for="visibility">{{.locale.Tr "org.settings.visibility"}}</label></span>
2020
<div class="inline-grouped-list">
2121
<div class="ui radio checkbox">
22-
<input class="enable-system-radio" tabindex="0" name="visibility" type="radio" value="0" {{if .DefaultOrgVisibilityMode.IsPublic}}checked{{end}}>
22+
<input class="enable-system-radio" name="visibility" type="radio" value="0" {{if .DefaultOrgVisibilityMode.IsPublic}}checked{{end}}>
2323
<label>{{.locale.Tr "org.settings.visibility.public"}}</label>
2424
</div>
2525
<div class="ui radio checkbox">
26-
<input class="enable-system-radio" tabindex="0" name="visibility" type="radio" value="1" {{if .DefaultOrgVisibilityMode.IsLimited}}checked{{end}}>
26+
<input class="enable-system-radio" name="visibility" type="radio" value="1" {{if .DefaultOrgVisibilityMode.IsLimited}}checked{{end}}>
2727
<label>{{.locale.Tr "org.settings.visibility.limited"}}</label>
2828
</div>
2929
<div class="ui radio checkbox">
30-
<input class="enable-system-radio" tabindex="0" name="visibility" type="radio" value="2" {{if .DefaultOrgVisibilityMode.IsPrivate}}checked{{end}}>
30+
<input class="enable-system-radio" name="visibility" type="radio" value="2" {{if .DefaultOrgVisibilityMode.IsPrivate}}checked{{end}}>
3131
<label>{{.locale.Tr "org.settings.visibility.private"}}</label>
3232
</div>
3333
</div>

templates/org/settings/options.tmpl

+3-3
Original file line numberDiff line numberDiff line change
@@ -36,19 +36,19 @@
3636
<label for="visibility">{{.locale.Tr "org.settings.visibility"}}</label>
3737
<div class="field">
3838
<div class="ui radio checkbox">
39-
<input class="enable-system-radio" tabindex="0" name="visibility" type="radio" value="0" {{if eq .CurrentVisibility 0}}checked{{end}}>
39+
<input class="enable-system-radio" name="visibility" type="radio" value="0" {{if eq .CurrentVisibility 0}}checked{{end}}>
4040
<label>{{.locale.Tr "org.settings.visibility.public"}}</label>
4141
</div>
4242
</div>
4343
<div class="field">
4444
<div class="ui radio checkbox">
45-
<input class="enable-system-radio" tabindex="0" name="visibility" type="radio" value="1" {{if eq .CurrentVisibility 1}}checked{{end}}>
45+
<input class="enable-system-radio" name="visibility" type="radio" value="1" {{if eq .CurrentVisibility 1}}checked{{end}}>
4646
<label>{{.locale.Tr "org.settings.visibility.limited"}}</label>
4747
</div>
4848
</div>
4949
<div class="field">
5050
<div class="ui radio checkbox">
51-
<input class="enable-system-radio" tabindex="0" name="visibility" type="radio" value="2" {{if eq .CurrentVisibility 2}}checked{{end}}>
51+
<input class="enable-system-radio" name="visibility" type="radio" value="2" {{if eq .CurrentVisibility 2}}checked{{end}}>
5252
<label>{{.locale.Tr "org.settings.visibility.private"}}</label>
5353
</div>
5454
</div>

templates/projects/view.tmpl

+2-2
Original file line numberDiff line numberDiff line change
@@ -86,10 +86,10 @@
8686
</div>
8787
{{if and $.CanWriteProjects (ne .ID 0)}}
8888
<div class="ui dropdown jump item">
89-
<div class="not-mobile gt-px-3" tabindex="-1">
89+
<div class="not-mobile gt-px-3">
9090
{{svg "octicon-kebab-horizontal"}}
9191
</div>
92-
<div class="menu user-menu" tabindex="-1">
92+
<div class="menu user-menu">
9393
<a class="item show-modal button" data-modal="#edit-project-board-modal-{{.ID}}">
9494
{{svg "octicon-pencil"}}
9595
{{$.locale.Tr "repo.projects.column.edit"}}

templates/repo/create.tmpl

+8-8
Original file line numberDiff line numberDiff line change
@@ -77,33 +77,33 @@
7777
<div class="inline field">
7878
<label>{{.locale.Tr "repo.template.items"}}</label>
7979
<div class="ui checkbox">
80-
<input name="git_content" type="checkbox" tabindex="0" {{if .git_content}}checked{{end}}>
80+
<input name="git_content" type="checkbox" {{if .git_content}}checked{{end}}>
8181
<label>{{.locale.Tr "repo.template.git_content"}}</label>
8282
</div>
8383
<div class="ui checkbox" {{if not .SignedUser.CanEditGitHook}}data-tooltip-content="{{.locale.Tr "repo.template.git_hooks_tooltip"}}"{{end}}>
84-
<input name="git_hooks" type="checkbox" tabindex="0" {{if .git_hooks}}checked{{end}}>
84+
<input name="git_hooks" type="checkbox" {{if .git_hooks}}checked{{end}}>
8585
<label>{{.locale.Tr "repo.template.git_hooks"}}</label>
8686
</div>
8787
</div>
8888
<div class="inline field">
8989
<label></label>
9090
<div class="ui checkbox">
91-
<input name="webhooks" type="checkbox" tabindex="0" {{if .webhooks}}checked{{end}}>
91+
<input name="webhooks" type="checkbox" {{if .webhooks}}checked{{end}}>
9292
<label>{{.locale.Tr "repo.template.webhooks"}}</label>
9393
</div>
9494
<div class="ui checkbox">
95-
<input name="topics" type="checkbox" tabindex="0" {{if .topics}}checked{{end}}>
95+
<input name="topics" type="checkbox" {{if .topics}}checked{{end}}>
9696
<label>{{.locale.Tr "repo.template.topics"}}</label>
9797
</div>
9898
</div>
9999
<div class="inline field">
100100
<label></label>
101101
<div class="ui checkbox">
102-
<input name="avatar" type="checkbox" tabindex="0" {{if .avatar}}checked{{end}}>
102+
<input name="avatar" type="checkbox" {{if .avatar}}checked{{end}}>
103103
<label>{{.locale.Tr "repo.template.avatar"}}</label>
104104
</div>
105105
<div class="ui checkbox">
106-
<input name="labels" type="checkbox" tabindex="0" {{if .labels}}checked{{end}}>
106+
<input name="labels" type="checkbox" {{if .labels}}checked{{end}}>
107107
<label>{{.locale.Tr "repo.template.issue_labels"}}</label>
108108
</div>
109109
</div>
@@ -169,7 +169,7 @@
169169
</div>
170170
<div class="inline field">
171171
<div class="ui checkbox" id="auto-init">
172-
<input name="auto_init" type="checkbox" tabindex="0" {{if .auto_init}}checked{{end}}>
172+
<input name="auto_init" type="checkbox" {{if .auto_init}}checked{{end}}>
173173
<label>{{.locale.Tr "repo.auto_init"}}</label>
174174
</div>
175175
</div>
@@ -204,7 +204,7 @@
204204
<div class="inline field">
205205
<label>{{.locale.Tr "repo.template"}}</label>
206206
<div class="ui checkbox">
207-
<input name="template" type="checkbox" tabindex="0">
207+
<input name="template" type="checkbox">
208208
<label>{{.locale.Tr "repo.template_helper"}}</label>
209209
</div>
210210
</div>

templates/repo/editor/commit_form.tmpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
</div>
1717
<div class="inline field">
1818
<div class="ui checkbox">
19-
<input name="signoff" type="checkbox" tabindex="0">
19+
<input name="signoff" type="checkbox">
2020
<label>{{.locale.Tr "repo.editor.signoff_desc"}}</label>
2121
</div>
2222
</div>

templates/repo/issue/new_form.tmpl

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
{{avatar $.Context .SignedUser 40}}
1212
<div class="ui segment content gt-my-0">
1313
<div class="field">
14-
<input name="title" id="issue_title" placeholder="{{.locale.Tr "repo.milestones.title"}}" value="{{if .TitleQuery}}{{.TitleQuery}}{{else if .IssueTemplateTitle}}{{.IssueTemplateTitle}}{{else}}{{.title}}{{end}}" tabindex="3" autofocus required maxlength="255" autocomplete="off">
14+
<input name="title" id="issue_title" placeholder="{{.locale.Tr "repo.milestones.title"}}" value="{{if .TitleQuery}}{{.TitleQuery}}{{else if .IssueTemplateTitle}}{{.IssueTemplateTitle}}{{else}}{{.title}}{{end}}" autofocus required maxlength="255" autocomplete="off">
1515
{{if .PageIsComparePull}}
1616
<div class="title_wip_desc" data-wip-prefixes="{{JsonUtils.EncodeToString .PullRequestWorkInProgressPrefixes}}">{{.locale.Tr "repo.pulls.title_wip_desc" (index .PullRequestWorkInProgressPrefixes 0| Escape) | Safe}}</div>
1717
{{end}}
@@ -35,7 +35,7 @@
3535
{{template "repo/issue/comment_tab" .}}
3636
{{end}}
3737
<div class="text right">
38-
<button class="ui green button loading-button" tabindex="6">
38+
<button class="ui green button loading-button">
3939
{{if .PageIsComparePull}}
4040
{{.locale.Tr "repo.pulls.create"}}
4141
{{else}}

templates/repo/issue/view_content/sidebar.tmpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -609,7 +609,7 @@
609609
</div>
610610

611611
<div class="field">
612-
<div class="ui fluid dropdown selection" tabindex="0">
612+
<div class="ui fluid dropdown selection">
613613

614614
<select name="reason">
615615
<option value=""> </option>

templates/repo/projects/view.tmpl

+2-2
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,10 @@
9090
</div>
9191
{{if and $.CanWriteProjects (not $.Repository.IsArchived) (ne .ID 0)}}
9292
<div class="ui dropdown jump item">
93-
<div class="not-mobile gt-px-3" tabindex="-1">
93+
<div class="not-mobile gt-px-3">
9494
{{svg "octicon-kebab-horizontal"}}
9595
</div>
96-
<div class="menu user-menu" tabindex="-1">
96+
<div class="menu user-menu">
9797
<a class="item show-modal button" data-modal="#edit-project-board-modal-{{.ID}}">
9898
{{svg "octicon-pencil"}}
9999
{{$.locale.Tr "repo.projects.column.edit"}}

templates/repo/settings/options.tmpl

+5-5
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@
316316
{{else}}
317317
<div class="ui radio checkbox">
318318
{{end}}
319-
<input class="enable-system-radio" tabindex="0" name="enable_external_wiki" type="radio" value="false" data-target="#external_wiki_box" {{if not (.Repository.UnitEnabled $.Context $.UnitTypeExternalWiki)}}checked{{end}}>
319+
<input class="enable-system-radio" name="enable_external_wiki" type="radio" value="false" data-target="#external_wiki_box" {{if not (.Repository.UnitEnabled $.Context $.UnitTypeExternalWiki)}}checked{{end}}>
320320
<label>{{.locale.Tr "repo.settings.use_internal_wiki"}}</label>
321321
</div>
322322
</div>
@@ -326,7 +326,7 @@
326326
{{else}}
327327
<div class="ui radio checkbox">
328328
{{end}}
329-
<input class="enable-system-radio" tabindex="0" name="enable_external_wiki" type="radio" value="true" data-target="#external_wiki_box" {{if .Repository.UnitEnabled $.Context $.UnitTypeExternalWiki}}checked{{end}}>
329+
<input class="enable-system-radio" name="enable_external_wiki" type="radio" value="true" data-target="#external_wiki_box" {{if .Repository.UnitEnabled $.Context $.UnitTypeExternalWiki}}checked{{end}}>
330330
<label>{{.locale.Tr "repo.settings.use_external_wiki"}}</label>
331331
</div>
332332
</div>
@@ -358,7 +358,7 @@
358358
{{else}}
359359
<div class="ui radio checkbox">
360360
{{end}}
361-
<input class="enable-system-radio" tabindex="0" name="enable_external_tracker" type="radio" value="false" data-context="#internal_issue_box" data-target="#external_issue_box" {{if not (.Repository.UnitEnabled $.Context $.UnitTypeExternalTracker)}}checked{{end}}>
361+
<input class="enable-system-radio" name="enable_external_tracker" type="radio" value="false" data-context="#internal_issue_box" data-target="#external_issue_box" {{if not (.Repository.UnitEnabled $.Context $.UnitTypeExternalTracker)}}checked{{end}}>
362362
<label>{{.locale.Tr "repo.settings.use_internal_issue_tracker"}}</label>
363363
</div>
364364
</div>
@@ -394,7 +394,7 @@
394394
{{else}}
395395
<div class="ui radio checkbox">
396396
{{end}}
397-
<input class="enable-system-radio" tabindex="0" name="enable_external_tracker" type="radio" value="true" data-context="#internal_issue_box" data-target="#external_issue_box" {{if .Repository.UnitEnabled $.Context $.UnitTypeExternalTracker}}checked{{end}}>
397+
<input class="enable-system-radio" name="enable_external_tracker" type="radio" value="true" data-context="#internal_issue_box" data-target="#external_issue_box" {{if .Repository.UnitEnabled $.Context $.UnitTypeExternalTracker}}checked{{end}}>
398398
<label>{{.locale.Tr "repo.settings.use_external_issue_tracker"}}</label>
399399
</div>
400400
</div>
@@ -552,7 +552,7 @@
552552
<p>
553553
{{.locale.Tr "repo.settings.default_merge_style_desc"}}
554554
</p>
555-
<div class="ui dropdown selection" tabindex="0">
555+
<div class="ui dropdown selection">
556556
<select name="pulls_default_merge_style">
557557
<option value="merge" {{if or (not $pullRequestEnabled) (eq $prUnit.PullRequestsConfig.DefaultMergeStyle "merge")}}selected{{end}}>{{.locale.Tr "repo.pulls.merge_pull_request"}}</option>
558558
<option value="rebase" {{if or (not $pullRequestEnabled) (eq $prUnit.PullRequestsConfig.DefaultMergeStyle "rebase")}}selected{{end}}>{{.locale.Tr "repo.pulls.rebase_merge_pull_request"}}</option>

0 commit comments

Comments
 (0)