-
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
feat: add context-menu #7350
feat: add context-menu #7350
Conversation
Deploy preview for carbon-elements ready! Built with commit fdb5d39 |
Deploy preview for carbon-components-react ready! Built without sensitive environment variables with commit fdb5d39 https://deploy-preview-7350--carbon-components-react.netlify.app |
Deploy preview for carbon-elements ready! Built with commit 4ca8433 |
Deploy preview for carbon-components-react ready! Built without sensitive environment variables with commit 8112a4a https://deploy-preview-7350--carbon-components-react.netlify.app |
Deploy preview for carbon-components-react ready! Built without sensitive environment variables with commit 4ca8433 https://deploy-preview-7350--carbon-components-react.netlify.app |
…MenuSelectableOption
@janhassel Thanks for the really fast fixes! Sorry to take so long to get back to you. This is looking really good now! I did notice something odd in the example: After the context menu has been opened and closed, the user needs to right-click twice to pop up the menu again. Or Shift+F10 twice. Or ctrl+left click (on Mac) twice.
Yes, you fixed it with the new markup for top-level groups. :)
#7768 might already have some of that extra logic?
Good question. It looks like Combobox does, and Dropdown doesn't. Do people use Dropdown to create menus in Carbon?
I think we have to go with the spec, because otherwise we will mess up the Windows screen readers. VO seems to have some strange quirks in this area, like saying "1" when a radio or checkbox menuitem is checked. Those will get fixed in time. The ARIA-AT project is working towards more consistency of AT behavior across platforms. Just for info, here's what NVDA says now (in Chrome) for the radio and checkbox menuitems. For the radio menu items, it says "radio menu item", and it says both "checked" and "not checked". Note that it doesn't say "checkbox" menuitem, but it does say both checked and not checked.
Here's what JAWS says (in Chrome) for those items (ignore the weird whitespace characters). Note that JAWS doesn't say radio or checkbox. For checkboxes, it says both "checked" and "not checked", but for radios, it only says "checked" and it doesn't say "not checked".
|
Is there any ETA on when this would be available? |
✅ Good catch, should be fixed now
💬 Yes, please open an issue for that once this PR is merged in
💬 Let's definitely open a serparate issue for this one. Personally, I think these should all behave the same, but a member of the Carbon team needs to make a call and then it should be applied to the individual components.
💬 Thanks, this is really helpful! Let's hope VoiceOver, JAWS and co will adopt these newer roles soon. @emyarod I believe this means the PR is ready for review again. Let's bring this in as experimental / unstable soon and work on further concerns and ideas in separate, smaller (and more managable) PRs. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes I have been following this after I approved the first time, just requested a review from myself while awaiting @carmacleod 's reviews. regarding the menu selection wrap behavior, I think the context menu should also wrap selection but that can be addressed separately
@emyarod Awesome. Yes, let's handle the wrapping in a separate issue. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 - good to go!
A bit of follow-up housekeeping:
|
Thank you, @carmacleod! 🙂 |
Closes #6830
Changelog
New
ContextMenu
ContextMenuOption
ContextMenuDivider
SelectableContextMenuOption
ContextMenuRadioGroup