-
Notifications
You must be signed in to change notification settings - Fork 8
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
Accessibility warnings with menu stories #185
Comments
I wonder if semantically it works better to encourage placement in an
Edit: originally had We lose the ability to style as part of the drawer then which isn't a big deal necessarily. We could make one of those layout elements we've discussed that gives those sections and some styling. Edit: Or maybe we just always have the aside as part of the shadow root. |
It looks like the |
Adding a |
@mollykreis the feature here is that when using certain elements within a menu it will apply some styles for you. Those would have to be updated to the new items chosen |
@rajsite, my question was whether we were fine always requiring usages of the menu to wrap the menu's content in a That said, I'm not seeing a good way to style the elements within a |
Some possible solutions:
I lean towards option 1 because it seems the most robust, and I don't think the implementation cost of creating a very simple new element will be very high. If we move forward with option 1 we can decide whether or not we want to create a wrapper for |
Yea I agree that option 1 seems less likely for a user to mess up. My general concern is that custom elements do have some overhead and if they don't provide unique functional value adding them unnecessarily is like a death by a 1000 cuts for performance. There have been questions like should would have a My guess is that there is likely some aria roles the element should be configuring on itself as a |
Looking at the aria configuration for menuitems I wonder if makes for sense to make a menu group type element. ie <nimble-menu>
<nimble-menu-group>
Edit Commands
<nimble-menu-item>Cut</nimble-menu-item>
<nimble-menu-item>Copy</nimble-menu--item>
<nimble-menu-item>Paste</nimble-menu-item>
</nimble-menu-group>
<hr>
<nimble-menu-item>Logout</nimble-menu-item>
</nimble-menu> A similar pattern is shown in example 2 on the mdn aria role group page. And nimble-menu-group would configure role="group" on itself and label itself with its text content (like we are doing for icon button accessibility) Edit: From looking at the foundation menu source it doesn't look like it would handle groups that well: https://github.com/microsoft/fast/blob/6db5ed1a1fa14a1dfab17154fcf005c682fccace/packages/web-components/fast-foundation/src/menu/menu.ts#L319 Maybe we should request groups within a menu as a feature? |
The Storybook Accessibility add-on notes that we're using the
<header>
tag in a naive way.Changing the
<header>
tag used in the story to……resolves the issues, but it be good to review if those settings are appropriate, if we should document that, or otherwise make it easy for clients to do the right thing.
The above story uses a statically defined and styled header to mimic the existing SystemLink user menu. If there are broader use cases, we should make this more robust to theming.
The text was updated successfully, but these errors were encountered: