aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelipe Leopoldo Sologuren GutiƩrrez <fsologureng@users.noreply.github.com>2023-03-24 06:43:52 -0300
committerGitHub <noreply@github.com>2023-03-24 17:43:52 +0800
commit87f0f7e670c6c0e6aeab8c4458bfdb9d954eacec (patch)
tree7efd83b21590d59aa6d0be84b2df49cb31efab49
parentd02e83a2c3e0bd1bc1150c4ed976928d967ac3f5 (diff)
downloadgitea-87f0f7e670c6c0e6aeab8c4458bfdb9d954eacec.tar.gz
gitea-87f0f7e670c6c0e6aeab8c4458bfdb9d954eacec.zip
Add aria attributes to interactive time tooltips. (#23661)
Fixes #23645 * Added `describedby` attribute to the reference element. * Eliminated `aria-expanded` attribute to the reference element in order to conform strictly with WCAG 2.1 rules.
-rw-r--r--web_src/js/modules/tippy.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/web_src/js/modules/tippy.js b/web_src/js/modules/tippy.js
index 98d0ff84b6..1f7a0eaf4f 100644
--- a/web_src/js/modules/tippy.js
+++ b/web_src/js/modules/tippy.js
@@ -44,7 +44,7 @@ function attachTooltip(target, content = null) {
delay: 100,
role: 'tooltip',
placement: target.getAttribute('data-tooltip-placement') || 'top-start',
- ...(target.getAttribute('data-tooltip-interactive') === 'true' ? {interactive: true} : {}),
+ ...(target.getAttribute('data-tooltip-interactive') === 'true' ? {interactive: true, aria: {content: 'describedby', expanded: false}} : {}),
};
if (!target._tippy) {