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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve accessibility in the pagination component #4258

Merged

Conversation

bethcollins92
Copy link
Contributor

Done

Improvements to the accessibility of our pagination component:

  • Added &[aria-current='page'] to the is-active styles
  • Wrapped all pagination examples in a <nav> with an aria-label so users know it's the pagination navigation
  • Added aria-label="page x" to each of the pages, to be more descriptive about what the number means
  • Added aria-current="page" to the active pages

Fixes #4256

QA

  • Open demo
  • Check nothing has broken on the pagination examples/docs
  • Check with voiceover the pagination examples
  • Accessibility documentation is currently being written so will be in a separate PR
  • The p-navigation class should be on the <nav> element, but this will be addressed in this issue

Check if PR is ready for release

If this PR contains Vanilla SCSS code changes, it should contain the following changes to make sure it's ready for the release:

  • PR should have one of the following labels to automatically categorise it in release notes:
    • Feature 馃巵, Breaking Change 馃挘, Bug 馃悰, Documentation 馃摑, Maintenance 馃敤.
  • Vanilla version in package.json should be updated relative to the most recent release, following semver convention:
    • if CSS class names are not changed it can be bugfix relesase (x.x.X)
    • if CSS class names are changed/added/removed it should be minor version (x.X.0)
    • see the wiki for more details
  • Any changes to component class names (new patterns, variants, removed or added features) should be listed on the what's new page.
  • Documentation side navigation should be updated with the relevant labels.

@webteam-app
Copy link

Demo starting at https://vanilla-framework-4258.demos.haus

Copy link
Contributor

@bartaz bartaz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@bartaz bartaz merged commit 59230a9 into canonical:main Jan 19, 2022
@bethcollins92 bethcollins92 deleted the 4256-fix-pagination-accessibility branch January 19, 2022 10:47
@bartaz bartaz added the Documentation 馃摑 Documentation changes or updates label Feb 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pagination isn't accessible
3 participants