summaryrefslogtreecommitdiffstats
path: root/web_src
diff options
context:
space:
mode:
authorOtto <otto@codeberg.org>2024-12-30 21:28:53 +0100
committerOtto <otto@codeberg.org>2024-12-30 21:28:53 +0100
commitceee649086bc3bb1ab81a79555c0a6c643654060 (patch)
tree44195b203a9422c2dd159073021e29daaee934e5 /web_src
parentMerge pull request 'Rework user profile settings' (#6407) from fnetx/profile-... (diff)
parentFix issue/comment menus (diff)
downloadforgejo-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.js5
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