Description
The problem
The Menu primitive uses a portal to render the ul
list. This was added in #8829 to:
avoid it being misplaced, cut off or invisible in certain setups (such as the DataTable toolbar)
Those issues may be solved now by the new autoAlign feature using floating ui, #15521.
The primary reason for this is that it's a risk of failing WCAG 1.3.2: Meaningful Sequence (Level A.) Specifically, Failure of Success Criterion 1.3.2 due to changing the meaning of content by positioning information with CSS.
The solution
Explore removing the portal in favor of rendering the menu adjacent to the trigger in the DOM and determine if floating-ui solves all the use cases for positioning and overlaying wrt Menu. This includes MenuButton, OverflowMenu, ContextMenu, etc.
This could be put behind a flag for now and included by default in the next major.
Short of this #16882 should at least be fixed so the portal destination is configurable.
Examples
No response
Application/PAL
No response
Business priority
Low Priority = release date is not dependent on fix or not upcoming
Available extra resources
No response
Code of Conduct
- I agree to follow this project's Code of Conduct