Skip to content

Accessibility improvements to the query pagination block #39535

Description

@JustinyAhin

Description

There are a few changes that could be made to the query pagination block to improve its a11y.

  • The pagination output should be wrapped inside a <nav> element
  • The <nav> element should have a meaningful aria-label to distinguish this navigation from other ones.
  • There should be a meaningful, visually hidden heading before the navigation.

See https://www.a11ymatters.com/pattern/pagination

Step-by-step reproduction instructions

  1. On a fresh installation, create a few posts
  2. Add the Query Loop block to a page, and update the posts number settings so that the navigation block can be displayed
  3. Check the block HTML output on the frontend

Screenshots, screen recording, code snippet

No response

Environment info

  • WordPress 6.0-alpha-52931
  • Gutenberg 12.8.0
  • Theme: TT1
  • Browser: Chromium: 99.0.4844.51
  • OS: macOS 12.3

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

Metadata

Metadata

Assignees

Labels

[Focus] Accessibility (a11y)Changes that impact accessibility and need corresponding review (e.g. markup changes).

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions