You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Every time the Playground block is used, it renders a <main> landmark. Really, this landmark should only be used once per page. Can this be replaced by another tag? Maybe just a generic <div>? You could also replace this with a <section aria-label="Playground"> but I think if the Playground block has surrounding headings, it's not a big deal.
The text was updated successfully, but these errors were encountered:
<!-- Thanks for contributing to WordPress Playground Tools! -->
## 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
Test page: https://learn.wordpress.org/test/wordpress-playground-block-plugin-test-page/
Every time the Playground block is used, it renders a
<main>
landmark. Really, this landmark should only be used once per page. Can this be replaced by another tag? Maybe just a generic<div>
? You could also replace this with a<section aria-label="Playground">
but I think if the Playground block has surrounding headings, it's not a big deal.The text was updated successfully, but these errors were encountered: