diff options
author | Otto <otto@codeberg.org> | 2024-12-30 21:28:53 +0100 |
---|---|---|
committer | Otto <otto@codeberg.org> | 2024-12-30 21:28:53 +0100 |
commit | ceee649086bc3bb1ab81a79555c0a6c643654060 (patch) | |
tree | 44195b203a9422c2dd159073021e29daaee934e5 /web_src | |
parent | Merge pull request 'Rework user profile settings' (#6407) from fnetx/profile-... (diff) | |
parent | Fix issue/comment menus (diff) | |
download | forgejo-ceee649086bc3bb1ab81a79555c0a6c643654060.tar.xz forgejo-ceee649086bc3bb1ab81a79555c0a6c643654060.zip |
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>
Diffstat (limited to 'web_src')
-rw-r--r-- | web_src/js/modules/tippy.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/web_src/js/modules/tippy.js b/web_src/js/modules/tippy.js index 83b28e5745..887e7194d9 100644 --- a/web_src/js/modules/tippy.js +++ b/web_src/js/modules/tippy.js @@ -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 |