Skip to content

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

2 participants