Merge pull request 'Fix issue/comment menus' (#6419) from fnetx/issue-view-a11y into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6419 Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
This commit is contained in:
commit
ceee649086
7 changed files with 39 additions and 8 deletions
|
@ -103,7 +103,10 @@ function switchTitleToTooltip(target) {
|
|||
}
|
||||
}
|
||||
target.setAttribute('data-tooltip-content', title);
|
||||
target.setAttribute('aria-label', title);
|
||||
// only replace if not explicitly set
|
||||
if (target.getAttribute('aria-label') !== null) {
|
||||
target.setAttribute('aria-label', title);
|
||||
}
|
||||
// keep the attribute, in case there are some other "[title]" selectors
|
||||
// and to prevent infinite loop with <relative-time> which will re-add
|
||||
// title if it is absent
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue