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

Fix pagination: make previous and next buttons accessible #2102

Open
wants to merge 33 commits into
base: main
Choose a base branch
from

Conversation

MewenLeHo
Copy link
Contributor

@MewenLeHo MewenLeHo commented Jun 23, 2023

Related issues

Closes #2008

Description

We currently have an a11y problem in pagination related to WCAG 2.1 Success Criterion 1.3.1 Info and Relationships (Level A) and WCAG 2.1 Success Criterion 1.3.2 Meaningful Sequence (Level A). It stated that all content must be available in text even when the CSS stylesheets are disabled.

If we disabled our stylesheets, the result is:
screenshot-deploy-preview-1931--boosted netlify app-2023 04 04-11_39_52

So:

  • 'Previous' and 'Next' are not displayed at all (please note that it's the case for all examples, not only the current one)

It appears that the < and > are conveying informations so they need to be focusable even when CSS is off.

With this prototype:
screenshot-localhost_9001-2023 06 23-14_23_35

Please note that I made the change only on the previous button to show the difference with the next button.

Motivation & Context

Improve a11y of pagination component

Types of change

  • New feature (non-breaking change which adds functionality)

Live previews

Checklist

Contribution

Accessibility

  • My change follows accessibility good practices; I have at least run axe

Design

  • My change respects the design guidelines defined in Orange Design System
  • My change is compatible with responsive display

Development

  • My change follows the developer guide
  • (NA) I have added JavaScript unit tests to cover my changes
  • (NA) I have added SCSS unit tests to cover my changes

Documentation

  • (NA) My change introduces changes to the documentation and/or I have updated the documentation accordingly

Checklist (for Core Team only)

  • My change introduces changes to the migration guide
  • (NA) My new component is added in Storybook
  • My new component is compatible with RTL
  • Manually run BrowserStack tests
  • Manually test browser compatibility with BrowserStack (Chrome >= 60, Firefox >= 60 (+ ESR), Edge, Safari >= 12, iOS Safari, Chrome & Firefox on Android)
  • Code review
  • Design review
  • A11y review

After the merge

@netlify
Copy link

netlify bot commented Jun 23, 2023

Deploy Preview for boosted ready!

Name Link
🔨 Latest commit eec7fb1
🔍 Latest deploy log https://app.netlify.com/sites/boosted/deploys/6596c0010eca56000872b24f
😎 Deploy Preview https://deploy-preview-2102--boosted.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@MewenLeHo

This comment was marked as outdated.

scss/_pagination.scss Outdated Show resolved Hide resolved
scss/_pagination.scss Outdated Show resolved Hide resolved
scss/_pagination.scss Outdated Show resolved Hide resolved
@MewenLeHo MewenLeHo marked this pull request as ready for review June 27, 2023 08:12
@julien-deramond julien-deramond marked this pull request as draft June 27, 2023 08:46
@sonarcloud
Copy link

sonarcloud bot commented Jun 28, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@louismaximepiton louismaximepiton self-requested a review July 4, 2023 13:58
@MewenLeHo MewenLeHo marked this pull request as ready for review July 24, 2023 11:58
@MewenLeHo MewenLeHo requested a review from Aniort August 22, 2023 13:46
@Aniort
Copy link
Contributor

Aniort commented Aug 22, 2023

ok, with the "title", i think, it's usable :)

@Franco-Riccitelli

This comment was marked as outdated.

scss/_pagination.scss Outdated Show resolved Hide resolved
scss/_pagination.scss Show resolved Hide resolved
scss/_pagination.scss Outdated Show resolved Hide resolved
@Franco-Riccitelli
Copy link

All looks good to me.

Copy link
Member

@louismaximepiton louismaximepiton left a comment

Choose a reason for hiding this comment

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

👌

@louismaximepiton louismaximepiton mentioned this pull request Oct 2, 2023
13 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Need Lead Dev Review
Development

Successfully merging this pull request may close these issues.

Pagination: Make the previous and next buttons accessible
4 participants