]> source.dussan.org Git - gitea.git/commitdiff
Improve checkbox accessibility a bit by adding the title attribute (#22593)
authorFelipe Leopoldo Sologuren Gutiérrez <fsologureng@users.noreply.github.com>
Wed, 1 Feb 2023 01:43:06 +0000 (22:43 -0300)
committerGitHub <noreply@github.com>
Wed, 1 Feb 2023 01:43:06 +0000 (01:43 +0000)
EDIT: The main change of this PR was resolved by #22599. This
complements that PR for some cases without label and complicated layout
to be added.

NOTE: Contributed by @Forgejo.

options/locale/locale_en-US.ini
templates/admin/config.tmpl
templates/org/team/new.tmpl
templates/repo/editor/commit_form.tmpl
templates/repo/issue/list.tmpl
templates/shared/issuelist.tmpl

index 3495afe859d0b363e1acabaaeef7b8db27e312fb..de80a710e97e94cf961f354e25592d8683b1ac93 100644 (file)
@@ -1131,6 +1131,7 @@ editor.commit_directly_to_this_branch = Commit directly to the <strong class="br
 editor.create_new_branch = Create a <strong>new branch</strong> for this commit and start a pull request.
 editor.create_new_branch_np = Create a <strong>new branch</strong> for this commit.
 editor.propose_file_change = Propose file change
+editor.new_branch_name = Name the new branch for this commit
 editor.new_branch_name_desc = New branch name…
 editor.cancel = Cancel
 editor.filename_cannot_be_empty = The filename cannot be empty.
@@ -1336,6 +1337,8 @@ issues.action_milestone = Milestone
 issues.action_milestone_no_select = No milestone
 issues.action_assignee = Assignee
 issues.action_assignee_no_select = No assignee
+issues.action_check = Check/Uncheck
+issues.action_check_all = Check/Uncheck all items
 issues.opened_by = opened %[1]s by <a href="%[2]s">%[3]s</a>
 pulls.merged_by = by <a href="%[2]s">%[3]s</a> was merged %[1]s
 pulls.merged_by_fake = by %[2]s was merged %[1]s
index 982cfb28008152bb344e293870da2d35d07b9556..c2ab31862d97e743e6960385d2f9e3b2792b1b35 100644 (file)
                                <dt>{{.locale.Tr "admin.config.disable_gravatar"}}</dt>
                                <dd>
                                        <div class="ui toggle checkbox">
-                                               <input type="checkbox" name="picture.disable_gravatar" version="{{.SystemSettings.GetVersion "picture.disable_gravatar"}}"{{if .SystemSettings.GetBool "picture.disable_gravatar"}} checked{{end}}>
+                                               <input type="checkbox" name="picture.disable_gravatar" version="{{.SystemSettings.GetVersion "picture.disable_gravatar"}}"{{if .SystemSettings.GetBool "picture.disable_gravatar"}} checked{{end}} title="{{.locale.Tr "admin.config.disable_gravatar"}}">
                                        </div>
                                </dd>
                                <div class="ui divider"></div>
                                <dt>{{.locale.Tr "admin.config.enable_federated_avatar"}}</dt>
                                <dd>
                                        <div class="ui toggle checkbox">
-                                               <input type="checkbox" name="picture.enable_federated_avatar" version="{{.SystemSettings.GetVersion "picture.enable_federated_avatar"}}"{{if .SystemSettings.GetBool "picture.enable_federated_avatar"}} checked{{end}}>
+                                               <input type="checkbox" name="picture.enable_federated_avatar" version="{{.SystemSettings.GetVersion "picture.enable_federated_avatar"}}"{{if .SystemSettings.GetBool "picture.enable_federated_avatar"}} checked{{end}} title="{{.locale.Tr "admin.config.enable_federated_avatar"}}">
                                        </div>
                                </dd>
                        </dl>
index 10b5abda31457c566f0b75b6888269f5d365535f..005d7ce4e510e6f65dcbf5038dc47169bd7cc55b 100644 (file)
@@ -78,7 +78,7 @@
                                                                                <tr>
                                                                                        <th>{{.locale.Tr "units.unit"}}</th>
                                                                                        <th class="center aligned">{{.locale.Tr "org.teams.none_access"}}
-                                                                                       <span class="tooltip vm" data-content="{{.locale.Tr "org.teams.none_access_helper"}}">{{svg "octicon-question" 16 "ml-2"}}</th>
+                                                                                       <span class="tooltip vm" data-content="{{.locale.Tr "org.teams.none_access_helper"}}">{{svg "octicon-question" 16 "ml-2"}}</span></th>
                                                                                        <th class="center aligned">{{.locale.Tr "org.teams.read_access"}}
                                                                                        <span class="tooltip vm" data-content="{{.locale.Tr "org.teams.read_access_helper"}}">{{svg "octicon-question" 16 "ml-2"}}</span></th>
                                                                                        <th class="center aligned">{{.locale.Tr "org.teams.write_access"}}
                                                                                                        </td>
                                                                                                        <td class="center aligned">
                                                                                                                <div class="ui radio checkbox">
-                                                                                                                       <input type="radio" class="hidden" name="unit_{{$unit.Type.Value}}" value="0"{{if or ($unit.Type.UnitGlobalDisabled) (eq ($.Team.UnitAccessMode $.Context $unit.Type) 0)}} checked{{end}}>
+                                                                                                                       <input type="radio" class="hidden" name="unit_{{$unit.Type.Value}}" value="0"{{if or ($unit.Type.UnitGlobalDisabled) (eq ($.Team.UnitAccessMode $.Context $unit.Type) 0)}} checked{{end}} title="{{$.locale.Tr "org.teams.none_access"}}">
                                                                                                                </div>
                                                                                                        </td>
                                                                                                        <td class="center aligned">
                                                                                                                <div class="ui radio checkbox">
-                                                                                                                       <input type="radio" class="hidden" name="unit_{{$unit.Type.Value}}" value="1"{{if or (eq $.Team.ID 0) (eq ($.Team.UnitAccessMode $.Context $unit.Type) 1)}} checked{{end}} {{if $unit.Type.UnitGlobalDisabled}}disabled{{end}}>
+                                                                                                                       <input type="radio" class="hidden" name="unit_{{$unit.Type.Value}}" value="1"{{if or (eq $.Team.ID 0) (eq ($.Team.UnitAccessMode $.Context $unit.Type) 1)}} checked{{end}} {{if $unit.Type.UnitGlobalDisabled}}disabled{{end}} title="{{$.locale.Tr "org.teams.read_access"}}">
                                                                                                                </div>
                                                                                                        </td>
                                                                                                        <td class="center aligned">
                                                                                                                <div class="ui radio checkbox">
-                                                                                                                       <input type="radio" class="hidden" name="unit_{{$unit.Type.Value}}" value="2"{{if (eq ($.Team.UnitAccessMode $.Context $unit.Type) 2)}} checked{{end}} {{if $unit.Type.UnitGlobalDisabled}}disabled{{end}}>
+                                                                                                                       <input type="radio" class="hidden" name="unit_{{$unit.Type.Value}}" value="2"{{if (eq ($.Team.UnitAccessMode $.Context $unit.Type) 2)}} checked{{end}} {{if $unit.Type.UnitGlobalDisabled}}disabled{{end}} title="{{$.locale.Tr "org.teams.write_access"}}">
                                                                                                                </div>
                                                                                                        </td>
                                                                                                </tr>
index 8700f7740151e0d9e3d890da0e8808fb1ea9602c..f4778e22d12222d663adf5e0db5281ead2f97c89 100644 (file)
@@ -61,7 +61,7 @@
                        <div class="quick-pull-branch-name {{if not (eq .commit_choice "commit-to-new-branch")}}hide{{end}}">
                                <div class="new-branch-name-input field {{if .Err_NewBranchName}}error{{end}}">
                                        {{svg "octicon-git-branch"}}
-                                       <input type="text" name="new_branch_name" value="{{.new_branch_name}}" class="input-contrast mr-2 js-quick-pull-new-branch-name" placeholder="{{.locale.Tr "repo.editor.new_branch_name_desc"}}" {{if eq .commit_choice "commit-to-new-branch"}}required{{end}}>
+                                       <input type="text" name="new_branch_name" value="{{.new_branch_name}}" class="input-contrast mr-2 js-quick-pull-new-branch-name" placeholder="{{.locale.Tr "repo.editor.new_branch_name_desc"}}" {{if eq .commit_choice "commit-to-new-branch"}}required{{end}} title="{{.locale.Tr "repo.editor.new_branch_name"}}">
                                        <span class="text-muted js-quick-pull-normalization-info"></span>
                                </div>
                        </div>
index 22a6104baa8837972ada11ade6e09ca8f1e30fd6..b9ae36201678442816143e3cc5e0096684e242a1 100644 (file)
@@ -30,8 +30,7 @@
                        <div class="six wide column">
                                {{if $.CanWriteIssuesOrPulls}}
                                        <div class="ui checkbox issue-checkbox-all vm">
-                                               <input type="checkbox"></input>
-                                               <label></label>
+                                               <input type="checkbox" title="{{.locale.Tr "repo.issues.action_check_all"}}">
                                        </div>
                                {{end}}
                                {{template "repo/issue/openclose" .}}
index f3aa2610bb1a2e29890c04b4744fa06a66897ad2..93d54930ffdd31443d9fe8a69ce83e8896d891e3 100644 (file)
@@ -5,8 +5,7 @@
                        <div class="issue-item-left df">
                                {{if $.CanWriteIssuesOrPulls}}
                                        <div class="ui checkbox issue-checkbox">
-                                               <input type="checkbox" data-issue-id={{.ID}}></input>
-                                               <label></label>
+                                               <input type="checkbox" data-issue-id={{.ID}} title="{{$.locale.Tr "repo.issues.action_check"}} «{{.Title}}»">
                                        </div>
                                {{end}}
                                <div class="issue-item-icon">