1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2024-12-22 12:54:53 -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,
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) {