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

Unify and fix accessibility of the various Pagination components #58133

Open
afercia opened this issue Jan 23, 2024 · 2 comments
Open

Unify and fix accessibility of the various Pagination components #58133

afercia opened this issue Jan 23, 2024 · 2 comments
Labels
[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

@afercia
Copy link
Contributor

afercia commented Jan 23, 2024

Description

The editor uses a few user interfaces where pagination buttons are in place. For example:

  • dataviews
  • patterns explorer
  • global styles revisions
  • possibly other places I may have missed

While theoretically these pagination are very similar and should work in a very similar way, they are all different and use different components.

From an accessibility perspective, there are a few issues. Most notably:

I'd tend to think these pagination tools should work and look the same way throughout the whole user interface.
It's also a good opportunity to fix the most relevant accessibility issuses and abstract some code.

Screenshots:

Dataviews pagination:

01 pagination dataviews

Patterns explorer pagination:

02 pagination patterns explorer

Global styles revisions pagination:

03 revisions pagination

NEW: Pages pagination: note: as far as I can tell this is the only case where the buttons do not trigger a focus loss because they use arira-disabled instead of disabled. Tooltips work as well. The implementation of the current page indicator is arguable though as it's a mix of translatable strings and labeling / value of the <select> element.

new pages pagination

Step-by-step reproduction instructions

  • Test one of these paginations for example the global styles one.
  • Go to Site editor > Styles > Revisions.
  • Use the keyboard and Tab to the 'Last page' button.
  • Observe the button doesn't show a tooltip.
  • Press Enter.
  • Observe the 'Last page' button is now not focusable because it has a disabled HTML attribute.
  • Observe focus is lost: press Tab again and observe the tab order starts from scratch from the document root.

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

@afercia afercia added [Type] Bug An existing feature does not function as intended [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). labels Jan 23, 2024
@mikachan
Copy link
Member

mikachan commented Mar 6, 2024

Noting that the Font Library modal also includes a pagination implementation, also discussed in #59591.

image

@t-hamano
Copy link
Contributor

Related to this issue, I suggested adding the Pagination component.

#55650

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[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

No branches or pull requests

3 participants