Improve Accessibility for Screen Readers through Keyboard Navigation

Created on 29 April 2025, 3 days ago
Updated 30 April 2025, 2 days ago

Problem/Motivation

Hello everyone,

first time contributor here! I am currently making my project more accessible to Screen Readers. I noticed that the <li> tags of each navigation item for a mega menu are not accessible through the keyboard with the Tabulator key and therefore Screen Readers do not target the main navigation points.

Another issue that occurs is the trigger of the mega menu. The user is not able to toggle the navigation item expanded/collapsed with the Spacebar nor the Enter key.

Note that Screen Reader Solutions like MacOS VoiceOver Control + Option + Arrow Keys for navigation or Control + Option + Spacebar for toggling expanded/collapsed does work.
Windows Narrator does also register those elements. Yet no toggling possible.

It is mainly targeted to cover the Tabulator navigation and Spacebar/Enter toggling.

Steps to reproduce

Noticed with version: 3.1.0

Simply navigate through the elements with the Tabulator key.

Proposed resolution

Adding a "tabindex='0'" attribute should already cover the most part. Then I would add some JavaScript or jQuery, what you prefer, to prevent the default behavior of the Spacebar and enable toggling also with the Spacebar and Enter key.

Remaining tasks

User interface changes

API changes

Data model changes

Feature request
Status

Active

Version

3.1

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024