Skip to content

Conversation

@brandonpayton
Copy link
Member

What?

Fixes #292 - "Playground block: A11Y: Remove duplicate main landmarks"

This PR replaces the Playground block's <main> element with a <section> element annotated with an aria-label.

Why?

There is only supposed to be one <main> element per document. We do not know if a document including a Playground block will be rendered within another <main> element, and there can be multiple Playground blocks in a single document.

Testing Instructions

  • npx nx run wordpress-playground-block:dev
  • Create a new post
  • Add a Playground block in the editor and confirm it renders normally
  • Publish the post and confirm the Playground block renders normally on the front end
  • Use screen reader and confirm that the section label is noted when engaging with the section

@brandonpayton
Copy link
Member Author

I'm going to merge this because it has been tested and is low risk.

@brandonpayton brandonpayton merged commit e7c9636 into trunk Jun 13, 2024
@brandonpayton brandonpayton deleted the pg-block-stop-monopolizing-main branch June 13, 2024 12:57
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.

Playground block: A11Y: Remove duplicate main landmarks

2 participants