-
Notifications
You must be signed in to change notification settings - Fork 12
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
Create context menu component #110
Conversation
Deploying with Cloudflare Pages
|
89e4651
to
8d0adcd
Compare
This component represents a menu that opens on a button press. Feedback on the API is very welcome - I'm pretty happy with how I managed to condense Radix's tree of menu components into a single component, but we need to make sure that it's intuitive for others too.
This component represents a menu that opens when another UI element is right-clicked or long-pressed.
8d0adcd
to
f2d00ee
Compare
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.
Unless I'm missing the key binding, this doesn't seem to be accessible.
Aside from that, I don't feel super confident this should be added to CW. Right click hijacking is pretty broadly considered a dark pattern. I've raised this with the compound team to see if this is something we want to support.
@robintown as it turns out we already have lots of right click menus in EW Desktop. (I guess right clicking is just not something I do... I had never used them) |
Keep in mind right click context menus are also triggered by Accessibility Technologies using the Menu key or Shift + F10, so they should be accessible if they are presented in the accessibility tree whatsoever. |
Re: accessibility - yes, I think we do need to be careful to only provide this component as an extra convenience for pointing device users, and always provide an alternative route for accessing the menu options. Maybe it's enough to document this in the component's doc comment? |
The current context menus in Element are accessible, given this it is very unlikely we'd want to degrade accessibility by removing those and running 2 implementations is worse than one we maintain ourselves. |
Not sure this is the best place to comment. |
@t3chguy I've taken a second look at the accessibility concerns:
How does this solution sound to you? I'd appreciate your review. |
This component represents a menu that opens when another UI element is right-clicked or long-pressed.
Screencast.from.2023-10-18.00-56-47.webm
Screencast.from.2023-10-18.00-57-04.webm