[EuiSelectableTemplateSitewide] Pass keyboard/mouse event to onChange handler#5926
Merged
cee-chen merged 4 commits intoelastic:mainfrom May 25, 2022
Merged
Conversation
- which will allow consumers to, e.g. react to shift clicks
… to react to shift key
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_5926/ |
Contributor
Author
|
@1Copenut do you mind code reviewing this real quick? I don't think there's any accessibility implications here, so this should be a fairly quick QA / stopgap solution for Kibana until we get a chance to refactor EuiSelectable to allow |
1Copenut
approved these changes
May 25, 2022
Contributor
1Copenut
left a comment
There was a problem hiding this comment.
LGTM! I tested briefly with keyboard and VoiceOver. No regression and the behavior worked as expected.
Your comment about Kibana needing to inform users of the new behavior is excellent.
…e` event to react to shift key" This reverts commit 1d893f4.
Contributor
Author
|
jenkins test this |
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_5926/ |
cee-chen
pushed a commit
to cee-chen/eui
that referenced
this pull request
May 26, 2022
… handler (elastic#5926) * Enhance EuiSelectable to send back click/keyboard events - which will allow consumers to, e.g. react to shift clicks * [REVERT ME] Example of how Kibana would update their `onChange` event to react to shift key * changelog * Revert "[REVERT ME] Example of how Kibana would update their `onChange` event to react to shift key" This reverts commit 1d893f4.
Merged
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR attempts to partially address #5408 - or at least unblock Kibana so they can get a basic 'open this link if the user was holding down the shift/cmd key' behavior.
This is not intended to be a best/perfect solution, which would involve changing the API & markup of
EuiSelectablesignificantly to allow<a>links and native a link behavior. This is also not a perfect screen reader solution as Kibana will likely need to provide some hidden or visible text hint to users thatshift+clickis even an option.QA
alertpops upChecklist
- [ ] Checked in both light and dark modes- [ ] Checked in mobile- [ ] Added documentation- [ ] Checked Code Sandbox works for any docs examples- [ ] Checked for breaking changes and labeled appropriately- [ ] Checked for accessibility including keyboard-only and screenreader modes- [ ] Updated the Figma library counterpart