Daily Accessibility Reviewaria-sort attribute uses localised/capitalised string instead of required ARIA token value #17823
Unanswered
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Problem
The
ariaSort()method inSortableTable/THead.vuereturns localised strings for thearia-sortattribute. The ARIA specification requiresaria-sortto use one of four fixed token values — all lowercase English — regardless of the page's display language.File:
shell/components/SortableTable/THead.vue(lines 166–172)The English
en-ustranslation forgeneric.noneis"None"(capitalised).aria-sort="None"is not a valid ARIA token and will be treated as an invalid value by browsers and screen readers — they may fall back toaria-sort="none"or ignore the attribute entirely.For non-English locales the translated strings will differ further (e.g. German "Aufsteigend", French "Croissant"), which always breaks the attribute since
aria-sortvalues are not translated.WCAG 2.2 references
ARIA spec reference: [aria-sort (WAI-ARIA 1.2)]((www.w3.org/redacted)
Recommended fix
Replace the i18n calls with the fixed ARIA token strings:
The visual label for the sort direction (if any is needed for display purposes) can remain translated; only the
aria-sortattribute value must use the fixed tokens.Beta Was this translation helpful? Give feedback.
All reactions