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

Accessibility: Do not hide popover when focusing an element within the popover #415

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

johanrd
Copy link

@johanrd johanrd commented Dec 5, 2020

Fixes an accessibility issue where the popover hides if an element within the popover is navigated to by keyboard.

<button>Tab into this button, then press Enter to open popover
  <EmberPopover @event="click">
    <button>Click Tab to move focus to this button</button> <!-- the popover should not hide -->
    <button>Click Tab again to move focus to this button</button> <!-- the popover should not hide -->
  </EmberPopover>
</button>

The fix checks if the relatedTarget of the 'focusout' event is inside inside the popover. If true, the popover is not hidden.

…e popover

Fixes an accessibility issue where the popover was hidden when an element within the popover was navigated to by keyboard.

The fix checks if the relatedTarget of the 'focusout' event is inside inside the popover. If true, the popover is not hidden.
Copy link
Collaborator

@maxfierke maxfierke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me! Mind adding some quick tests for both tooltips and popovers to protect from regressions?

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

Successfully merging this pull request may close these issues.

2 participants