Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Accessibility issue with links listing blocks. #64051

Open
2 tasks done
Hug0-Drelon opened this issue Jul 29, 2024 · 1 comment · May be fixed by #66866
Open
2 tasks done

Accessibility issue with links listing blocks. #64051

Hug0-Drelon opened this issue Jul 29, 2024 · 1 comment · May be fixed by #66866
Labels
[Block] Categories Affects the Categories Block [Block] Page List Affects the Page List Block [Block] Tag Cloud Affects the Tag Cloud Block [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). [Type] Bug An existing feature does not function as intended

Comments

@Hug0-Drelon
Copy link
Contributor

Hug0-Drelon commented Jul 29, 2024

Description

Blocks listing links aren't wrapped in a <nav> leading to accessibility issue.
Although it has been done for old fashioned widget, see https://make.wordpress.org/core/2020/07/09/accessibility-improvements-to-widgets-outputting-lists-of-links-in-5-5/

Concerned blocks I found are:

  • core/page-list
  • core/categories
  • core/tag-cloud

core/posts-list might be concerned in some cases.

Step-by-step reproduction instructions

Add one of the mentioned block in a post and see there is no <nav> on frontend.

Screenshots, screen recording, code snippet

No response

Environment info

No response

Please confirm that you have searched existing issues in the repo.

  • Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

  • Yes
@Hug0-Drelon Hug0-Drelon added the [Type] Bug An existing feature does not function as intended label Jul 29, 2024
@t-hamano t-hamano added [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). [Block] Categories Affects the Categories Block [Block] Tag Cloud Affects the Tag Cloud Block [Block] Page List Affects the Page List Block labels Jul 29, 2024
@carolinan
Copy link
Contributor

carolinan commented Nov 10, 2024

Hi @Hug0-Drelon
Can you explain in more detail what the accessibility issue is, and perhaps include some references to the WCAG?

The block does not know what context it is used in, only the person placing the blocks would know that, so it may not be appropriate to use the nav element for these blocks by default. The page list is also able to be placed inside the navigation block, so it should not have two nav elements, it would need to be conditional.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Categories Affects the Categories Block [Block] Page List Affects the Page List Block [Block] Tag Cloud Affects the Tag Cloud Block [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants