1
0
mirror of https://github.com/go-gitea/gitea.git synced 2024-11-04 08:17:24 -05:00

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.
This commit is contained in:
Felipe Leopoldo Sologuren Gutiérrez 2023-03-24 06:43:52 -03:00 committed by GitHub
parent d02e83a2c3
commit 87f0f7e670
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -44,7 +44,7 @@ function attachTooltip(target, content = null) {
delay: 100, delay: 100,
role: 'tooltip', role: 'tooltip',
placement: target.getAttribute('data-tooltip-placement') || 'top-start', 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) { if (!target._tippy) {