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

POC: Focus trap in non-AMP #298

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

Conversation

adekbadek
Copy link
Member

All Submissions:

Changes proposed in this Pull Request:

Closes #24.

Because of lack of AMP callbacks, this focus trap is activated in a somewhat hacky way, and there's no way to deactivate it – which results in a JS error being thrown after the campaign is dismissed.
Ideally, we should use the focus trap as part of the general non-AMP JS refactor (replacing AMP scripts with bespoke JS) – so this is a POC.

How to test the changes in this Pull Request:

  1. Create an overlay campaign, view page in non-AMP mode
  2. Observe the focus is trapped inside the modal by tabbing through the focusable elements

Other information:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes, as applicable?
  • Have you successfully ran tests with your changes locally?

@adekbadek adekbadek added the A11y label Nov 3, 2020
@adekbadek adekbadek mentioned this pull request Nov 3, 2020
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Focus trap in overlay campaigns
1 participant