-
Notifications
You must be signed in to change notification settings - Fork 1.2k
[Button] keypress, keydown, and keyup events #860
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
Conversation
9861600
to
3392409
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.
Code and tests LGTM!
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.
I think we will want to provide some README.md
/style guide documentation around giving merchants instructions if non-standard button events are used. I can draft something as part of the accessibility guidelines for buttons (current draft here), but I think it might warrant expanding that into an section on non-standard interactions on the Interaction states page in the style guide.
@danrosenthal @francinen What would you think about that type of guidance, and/or perhaps working on a pattern guide around events? We could use the drag-and-drop interaction as an example.
I think it would also be worthwhile to consider making a drag-and-drop component.
cc @tmlayton
@dpersing I think that would be worth investing in. Is there a specific approach to providing that context to merchants that the documentation should endorse, e.g., using |
@francinen I think having visible instructions (for sighted keyboard users) tied to the feature with |
@dpersing do you think we should make it part of this PR? |
@tmlayton I think it would make sense to include in component-level accessibility documentation, which is dependent on https://github.com/Shopify/polaris-styleguide/pull/2493. I think shipping before that's complete would be totally fine. I've included a call-out for non-standard button events in what will get published when we can. |
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.
Thank you!
65d3b10
to
ee27316
Compare
WHY are these changes introduced?
Porting over from https://github.com/Shopify/polaris-react-deprecated/pull/1820
WHAT is this pull request doing?
Add events for the aforementioned.
How to 🎩
🖥 Local development instructions
🗒 General tophatting guidelines
📄 Changelog guidelines
Copy-paste this code in
playground/Playground.tsx
:🎩 checklist
Tested on mobileTested on multiple browsersTested for accessibility