Skip to content

[A11Y] Focus can leave open nav drawer on mobile #2665

Closed
@davwheat

Description

Bug Report

Current Behavior
Using TAB to shift focus around the mobile nav drawer allows focus to leave the drawer to the page content behind it.

Steps to Reproduce

  1. Shrink viewport
  2. Open drawer
  3. Tab to last drawer element
  4. Press tab again
  5. Focus is in background page

Expected Behavior
Focus should be trapped inside the nav drawer

Possible Solution
We need a focus trapper.

We could use a pre-existing one from npm, but it's 2.9 kB in size (and steadily increasing), which is a fair amount for what it does.

As that supports IE9, and we have jQuery (for now), we might be able to make our own version based off of that package, but using jQuery snippets instead, which should cut down on bundle size a ton.

Metadata

Assignees

Labels

type/accessibilityIssues relating to accessibility (keyboard navigation, screenreaders, text contrast, etc.)

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions