The ContentOnlySettingsMenu
breaks the ARIA menu pattern
#65514
Labels
[Focus] Accessibility (a11y)
Changes that impact accessibility and need corresponding review (e.g. markup changes).
[Package] Components
/packages/components
[Package] Editor
/packages/editor
[Type] Regression
Related to a regression in the latest release
Description
#62354 introduced a
ContentOnlySettingsMenu
component that is then used in a few places in the editor. This component adds a menu item and a paragraph with some extr ainformation inside a few dropdown menus.The dropdown menus are ARIA menus. They can only contain specific roles and they cannot contain paragraphs.
There have been ohter cases in the past where extraneous content was added inside ARIA menus and they all have been raised as issues and fixed. I'm surprised extraneous content has been added to ARIA menus again as this has been reported a few times already for previous cases. See for example:
#58313
#13390
#12505
#5953
It's worth reminding:
Important
An ARIA menu can only contain elements with role group, separator, menuitem and the menuitems variants. It can not contain anything else.
Reference:
https://www.w3.org/TR/wai-aria-1.2/#menubar
Required Owned Elements:
The presence of the paragraph with extra information:
Note: For the ones that only test with VoiceOver on macOS, the behavior described above only happens with Windows screen readers. VoiceOv er has a different interaction model which is, in a way, non-standard.
Also important:
I seem to recall there were checks in place to make sure an UI with role=menu only contains the expected roles. Not sure if something has changed in that regard or maybe the checks I'm thinking at are specific to some other component. Cc @youknowriad
Regardless, this extraneous content inside the ARIA menus must be removed as it totally breaks the expected semantics and interaction.
From a design perspective, I'd argue this isn't a great design pattern as some important information is buried down inside a dropdown menu, which is just a good way to hide important information,
@WordPress/gutenberg-components given this happened a few times already, it appeaers to me there should be some kind of mechanism to ensure an ARIA menu doesn't contain extraneous content. Is there any way to make sure an ARIA menu only contains menu items? Thanks.
Cc @ramonjd @talldan @kevin940726
Step-by-step reproduction instructions
To see an example of this pattern follo the steps below. Other example are in the screenshot in the original PR #62354
Screenshots, screen recording, code snippet
Environment info
No response
Please confirm that you have searched existing issues in the repo.
Please confirm that you have tested with all plugins deactivated except Gutenberg.
The text was updated successfully, but these errors were encountered: