Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Change aria-checked to only be used on matching ARIA roles for MenuItem. #11459
Changes aria-checked to only be used on matching ARIA roles for MenuItem. Fixes an a11y issue where Screen readers can not properly understand the BlockNavigationList for which block is currently active.
How has this been tested?
Via Jest and manually: see here
Types of changes
Updates the MenuItem component from the general components library to only use aria-checked when the aria-role is either menuitemcheckbox, or menuitemradio. This also changes BlockNavigationList to use the menuitemradio role, so screen readers can properly understand which block is currently active.
From an a11y perspective LGTM. Love to see specifications enforced through code, thank you.
The Menu component has now a good a11y, can be used for generic items, single choice, and multiple choice with a proper feedback for assistive technologies.
Re: the blocks navigation menu, worth noting if it's meant to support nested blocks too (e.g. blocks within Columns) then I guess it should be changed in something else than a menu. Will discuss this with the accessibility team and report the feedback,