ampproject / ampproject/ampstart

[Accessibility] Sidebar does not pass WCAG 2.1 guideline on focus

Open
#572 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
HTML
Stars
415
Forks
147
PR merge metrics
No merged PRs in 30d

Description

The [Ampstart Sidebar component](https://github.com/ampproject/ampstart/blob/master/components/navbar/sidebar.snip.html) focuses elements in a sequence that does not meet the [WCAG recommendations](https://www.w3.org/TR/2016/NOTE-WCAG20-TECHS-20161007/F85).

# Test scenarios:
Test link: amp-ecommerce-qa.firebaseapp.com/templates/e-commerce/landing.amp

Issue 1: Items outside the sidebar are focusable when sidebar is open
1. Tab to navbar trigger in header and press Enter to open sidebar (notice that the trigger element is also not focusable, see Issue #569 )
2. Tab through menu items until the end
3. Tab beyond the last menu item and notice that focus continues outside the sidebar to the main content

Issue 2: Tab sequence does not continue across navigation header after closing menu:
1. Tab to navbar trigger in header
2. Tab to close button and press Enter to close sidebar
3. Continue to tab and notice that remaining navigation links in header are skipped

# Expected behavior
Focus area toggles between sidebar and main page when sidebar opens/closes. Tab sequence should align with WCAG recommendations.

Contributor guide

Open the contributing guide

Research direction

Start with components/navbar/sidebar.snip.html and reproduce both focus-order scenarios at the linked amp-ecommerce-qa.firebaseapp.com test page. Check the sidebar's open and close behavior against the linked WCAG guidance; done means focus stays in the sidebar while it is open and resumes the remaining navigation links after it closes.

Written by the indexing model from the issue text.

Assessment

Tech stack
html
Domain
accessibility, frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.