Skip to content
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

EuiWrappingPopover example in popover docs for help #5102

Closed
wants to merge 1 commit into from

Conversation

rshen91
Copy link
Contributor

@rshen91 rshen91 commented Aug 26, 2021

Summary

This is for further context in issue #5015

The example is in http://localhost:8030/#/layout/popover at the bottom elastic_charts_wrapping_example.js is the file. The demo is <ElasticChartsColorPickerStoryExample />

User should be able to use the tab key to select the color icon and then hit the enter key to open the color picker. They can then tab through all the options in the color picker. The issue Im having and am stuck on is when the user hits Enter on the Done button, focus is not returned to the legend item color icon. The behavior is fine with the escape key when the color picker is open.

Thank you!

Checklist

  • Check against all themes for compatibility in both light and dark modes
  • Checked in mobile
  • Checked in Chrome, Safari, Edge, and Firefox
  • Props have proper autodocs and playground toggles
  • Added documentation
  • Checked Code Sandbox works for the any docs examples
  • Added or updated jest tests
  • Checked for breaking changes and labeled appropriately
  • Checked for accessibility including keyboard-only and screenreader modes
  • A changelog entry exists and is marked appropriately

@kibanamachine
Copy link

Preview documentation changes for this PR: https://eui.elastic.co/pr_5102/

@thompsongl thompsongl self-requested a review August 26, 2021 16:48
@thompsongl
Copy link
Contributor

@rshen91 I don't have a good answer yet as to why focus isn't returned automatically, but introducing a slight timeout to anchor.focus() in your handleClose method works:

const handleClose = () => {
        onClose();
-       anchor.focus()
+       requestAnimationFrame(() => anchor.focus());

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants