Skip to content

Commit 84a7d6b

Browse files
committed
fix incorrect aria attribute
1 parent b3703f8 commit 84a7d6b

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

templates/repo/view_file.tmpl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -137,10 +137,10 @@
137137
</table>
138138
<div class="code-line-menu tippy-target">
139139
{{if $.Permission.CanRead $.UnitTypeIssues}}
140-
<a class="item ref-in-new-issue" aria-role="menuitem" data-url-issue-new="{{.RepoLink}}/issues/new" data-url-param-body-link="{{.Repository.Link}}/src/commit/{{PathEscape .CommitID}}/{{PathEscapeSegments .TreePath}}{{if $.HasSourceRenderedToggle}}?display=source{{end}}" rel="nofollow noindex">{{ctx.Locale.Tr "repo.issues.context.reference_issue"}}</a>
140+
<a class="item ref-in-new-issue" role="menuitem" data-url-issue-new="{{.RepoLink}}/issues/new" data-url-param-body-link="{{.Repository.Link}}/src/commit/{{PathEscape .CommitID}}/{{PathEscapeSegments .TreePath}}{{if $.HasSourceRenderedToggle}}?display=source{{end}}" rel="nofollow noindex">{{ctx.Locale.Tr "repo.issues.context.reference_issue"}}</a>
141141
{{end}}
142-
<a class="item view_git_blame" aria-role="menuitem" href="{{.Repository.Link}}/blame/commit/{{PathEscape .CommitID}}/{{PathEscapeSegments .TreePath}}">{{ctx.Locale.Tr "repo.view_git_blame"}}</a>
143-
<a class="item copy-line-permalink" aria-role="menuitem" data-url="{{.Repository.Link}}/src/commit/{{PathEscape .CommitID}}/{{PathEscapeSegments .TreePath}}{{if $.HasSourceRenderedToggle}}?display=source{{end}}">{{ctx.Locale.Tr "repo.file_copy_permalink"}}</a>
142+
<a class="item view_git_blame" role="menuitem" href="{{.Repository.Link}}/blame/commit/{{PathEscape .CommitID}}/{{PathEscapeSegments .TreePath}}">{{ctx.Locale.Tr "repo.view_git_blame"}}</a>
143+
<a class="item copy-line-permalink" role="menuitem" data-url="{{.Repository.Link}}/src/commit/{{PathEscape .CommitID}}/{{PathEscapeSegments .TreePath}}{{if $.HasSourceRenderedToggle}}?display=source{{end}}">{{ctx.Locale.Tr "repo.file_copy_permalink"}}</a>
144144
</div>
145145
{{end}}
146146
{{end}}

web_src/js/webcomponents/overflow-menu.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,16 +36,16 @@ window.customElements.define('overflow-menu', class extends HTMLElement {
3636
return;
3737
}
3838

39-
// remove aria-role from items that moved from tippy to menu
39+
// remove aria role from items that moved from tippy to menu
4040
for (const item of menuItems) {
4141
if (!this.tippyItems.includes(item)) {
42-
item.removeAttribute('aria-role');
42+
item.removeAttribute('role');
4343
}
4444
}
4545

4646
// move all items that overflow into tippy
4747
for (const item of this.tippyItems) {
48-
item.setAttribute('aria-role', 'menuitem');
48+
item.setAttribute('role', 'menuitem');
4949
this.tippyContent.append(item);
5050
}
5151

0 commit comments

Comments
 (0)