-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Overflow-menu: Content is not within a landmark element #7305
Comments
Any status on when this issue might be resolved? |
What's the logic for the component determining where to insert the floating menu? It looks like for Docs it's incorrectly inserting it into instead of where the button is actually rendered in the dom structure. In the above screenshot, the overflow menu button is within the landmark, however when clicking it, the floating menu is rendered at the bottom in |
the floating menu is created using React portals, and if no target node is supplied then it's attached to |
I see in the source there is this snippet for getTarget that is passed to FloatingMenu: /**
* @returns {Element} The DOM element where the floating menu is placed in.
*/
_getTarget = () => {
const { current: triggerEl } = this._triggerRef;
return (
(triggerEl && triggerEl.closest('[data-floating-menu-container]')) ||
document.body
);
}; Does this mean I need to put |
@gptt916 Yes, I believe adding |
Doesn't look this this is documented on the component page, could this be added somewhere? |
@gptt916 it looks like we only got about halfway through updating the docs on our components, I'll take some time today to update the |
Environment
mac
Chrome
Detailed description
x.23.2
Should pass accessibility
Failed on landmark rule
Steps to reproduce the issue
Click the Overflow menu button.
Additional information
The checker is failing on the
span
and the twobutton
elements in this screenshot:The text was updated successfully, but these errors were encountered: