Enforce DropdownMenu to follow the ARIA menu pattern or add linting to make sure it does #67795
Open
2 of 6 tasks
Labels
[Focus] Accessibility (a11y)
Changes that impact accessibility and need corresponding review (e.g. markup changes).
[Package] Components
/packages/components
[Type] Bug
An existing feature does not function as intended
Description
Splitting this out from #67647 (comment)
There have been several cases where extraneous content such as paragraphs with descriptions or other extraneous content have been used inside the ARIA menu rendered by DropdownMenu.
ARIA menus can only contain menuitems (including the menuitemradio and menuitemcheckbox variants), groups and separators. No other content type is allowed within an ARIA menu.
It would be good ot prevent such misusage and breakage of the ARIA pattern by enforcing this constrain via code or, at the very least, by adding some linting rule to prevent extraneous content from being used inside a DropdownMenu.
Step-by-step reproduction instructions
N/A
Screenshots, screen recording, code snippet
No response
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.
Please confirm which theme type you used for testing.
The text was updated successfully, but these errors were encountered: