Summary
When accordions have elements that meet these conditions, pa11y and axe throw an error. The specific conditions are:
- horizontally scrollable container (usually code blocks)
- vertically scrollable container
- small viewport
- no focusable element
However, if a focusable element (like a link) exists, no error is thrown.
We suspect this is a false positive. However, we also discussed that this likely isn't happening on larger viewports because a "copy code block" button is sometimes present, which means that a focusable element is present.
Steps to reproduce
- Navigate to https://designsystem.digital.gov/documentation/migration/
- Narrow the browser viewport size to simulate a mobile experience (typically this will mean your browser viewport can't narrow any further)
- Increase your text size programmatically using
command + + (or ctrl + +)
- Expand the first accordion with a heading "If you're using USWDS Gulp"
- Run axe browser extension
- Observe an error thrown for the first accordion element
Next:
- Open your browser's code inspector
- Under the first accordion element (with a heading "If you're using USWDS Gulp"), add an HTML link element
- Run axe browser extension again
- Observe no error
Tasks
Summary
When accordions have elements that meet these conditions, pa11y and axe throw an error. The specific conditions are:
However, if a focusable element (like a link) exists, no error is thrown.
We suspect this is a false positive. However, we also discussed that this likely isn't happening on larger viewports because a "copy code block" button is sometimes present, which means that a focusable element is present.
Steps to reproduce
command++(orctrl++)Next:
Tasks