Skip to content

a11y: Scope the a11y scan out of sketch preview frames - #1599

Open
coseeian wants to merge 1 commit into
processing:mainfrom
coseeian:a11y-scan-scope-sketch-frames
Open

coseeian wants to merge 1 commit into
processing:mainfrom
coseeian:a11y-scan-scope-sketch-frames

Conversation

@coseeian

@coseeian coseeian commented Sep 14, 2026 •

Copy link
Copy Markdown
Collaborator

This PR stops a11y page tests from reporting duplicate landmark-unique violations inside sketch preview frames.

axe automatically merges same-origin iframe DOMs into the main page's test suite. And p5 SDK generates sketch contents at runtime, creating an unnamed <main> for every canvas. So any page with an embedded sketch triggers duplicate landmark violations against the page's own <main> region.

We can't fix this at the site level. The <main> landmark structure in sketch frames comes from runtime of p5 SDK.

So this PR uses the target frame selector ["iframe", "body"] to ignore the inner frame contents, while continuing to test the <iframe> element itself for accessibility attributes like title. Nothing site-authored is skipped.

@coseeian
coseeian marked this pull request as ready for review September 14, 2026 12:58
@coseeian coseeian added the Accessibility: Best Practice No obvious current impact, but which may lead to problems in the future label Sep 14, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Accessibility: Best Practice No obvious current impact, but which may lead to problems in the future

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant