trussworks / react-uswds

USWDS 3.0 components built in React
https://trussworks.github.io/react-uswds/
Apache License 2.0
169 stars 78 forks source link

[fix]: Pagination a11y issue on role attribute #2916

Open rylew1 opened 2 months ago

rylew1 commented 2 months ago

ReactUSWDS Version & USWDS Version:

Describe the bug

To Reproduce Steps to reproduce the behavior:

  1. Add a Pagination component

  2. Run LIghthouse with a11y checked: image

  3. Observe a11y issue flagged by Lighthouse: image

Expected behavior

No a11y issues reported

Additional context

It looks like dependabot updated things from uswds here: https://github.com/trussworks/react-uswds/pull/2556 If you look at the release notes you'll see the Pagination issue looks like it was fixed: image

But the dependabot update didn't replace the role attribute in the Pagination component.

We need to replace the role attribute with this: aria-label="ellipsis indicating non-visible pages"

Device and Browser Information (please complete the following information if describing a UI bug):