Open tay1orjones opened 1 week ago
Thank you for submitting a feature request. Your proposal is open and will soon be triaged by the Carbon team.
If your proposal is accepted and the Carbon team has bandwidth they will take on the issue, or else request you or other volunteers from the community to work on this issue.
The problem
The Menu primitive uses a portal to render the
ul
list. This was added in https://github.com/carbon-design-system/carbon/pull/8829 to:Those issues may be solved now by the new autoAlign feature using floating ui, https://github.com/carbon-design-system/carbon/issues/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 https://github.com/carbon-design-system/carbon/issues/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