Selected-language control has no accessible name and cannot be reached by keyboard
🙂 Looking for an issue? Welcome! This issue is open for contribution. If this is the first time you’re requesting an issue, please:
- Read Contributing guidelines carefully. Pay extra attention to Using generative AI. Pull requests and comments that don’t follow the guidelines won’t be answered.
- Confirm that you’ve read the guidelines in your comment.
Observed behavior
SelectedLanguage.vue renders the currently-active language as:
<KIconButton icon="language" aria-hidden="true" tabindex="-1" class="globe px-8" @click="$emit('click')" />
<span class="no-shrink px-8" :title="selectedLanguage.english_name">{{ selectedLanguage.lang_name }}</span>
The KIconButton is the only element with a click handler (@click="$emit('click')", wired up by
the parent in LanguageSwitcherList.vue to open the language switcher modal). It is marked
aria-hidden="true" and tabindex="-1". The adjacent <span> is plain text with no interactive
role at all.
Confirmed live: reading the accessibility tree of (sign-in page) shows
every non-selected language (Español, Français, Kiswahili, …) as a real
link "Spanish (Latin America)" etc., while the currently-selected language renders as bare
generic "English" — no role, no accessible name, not focusable.
User-facing consequences
Screen-reader users hear the selected language as plain text, for example "English", but nothing tells them that it is the current language. Keyboard users can already open the language switcher: when the list overflows, the "More languages" button opens it, and every other language is a focusable link that switches the language directly. SelectedLanguage is used only in LanguageSwitcherList, on the sign-in page and in the setup wizard.
Steps to reproduce
- Open Kolibri's sign-in page in a browser (
http://localhost:8000on a local dev instance, or any public Kolibri instance). - Open the browser's accessibility tree inspector (Chrome DevTools → Accessibility, or a screen reader) and inspect the language list at the bottom of the page.
- Every language except the currently-selected one exposes as a focusable link with a name. The selected language ("English" by default) exposes as a plain, non-interactive node with no accessible name, despite looking identical in a mouse-driven UI.
- Tab through the page — focus never lands on the selected-language control.
Acceptance Criteria
- [ ] The globe in
SelectedLanguage.vuestays out of the tab order and hidden from assistive technology (aria-hidden="true"andtabindex="-1"). Keyboard users open the language switcher through "More languages", as they do today. - [ ] A screen reader announces the selected language as the current language, for example "English, current language".
- [ ] Any new text is translatable and has a
context. - [ ] A test for
SelectedLanguage.vuechecks that the current language is announced as current, and that the globe is not in the tab order.
/assign
Hi! 👋
Thanks so much for your interest! This issue is already assigned. Visit Contributing guidelines to learn about the contributing process and how to find suitable issues. If there are no unassigned 'help wanted' issues available, please wait until new ones are added.
We really appreciate your willingness to help. 😊
Are you preparing for Google Summer of Code? See our GSoC guidelines.
@sarwar-jahin-port, I updated the acceptance criteria of this issue. The globe stays out of the tab order by design, because "More languages" already opens the same modal by keyboard. The remaining gap is that a screen reader does not hear which language is current. The review on #15631 has the details.
Thanks for clarifying. I'll check the details on #15631 and address the screen reader accessibility gap.