digdir / designsystemet

Designsystemet
https://designsystemet.no
MIT License
78 stars 36 forks source link

Paginations `<nav>` should have `[aria-label]` #1399

Closed tajakobsen closed 9 months ago

tajakobsen commented 9 months ago

Description of the bug

It is recommended to name landmarks on the page, so that screen reader-users easily can get an overview.

I suggest adding a [aria-label] to the <nav> element in Pagination to achieve this, so that we would get something like this:

<nav aria-label="Paginering">
  ...
</nav>

I leave it up to the team if the text should be configurable or not, and what the text should be.


I can see that rest can be used to set this [aria-label], but it should probably be set by default so it's not forgotten.

Steps To Reproduce

  1. Open the Pagination page in Storybook
  2. Inspect the page and see that [aria-label] is not set on <nav>.

Additional Information

No response

mrosvik commented 9 months ago

Example here: https://www.uutilsynet.no/tilsynsrapportar/rapportar-fra-tilsyn/1167?f%5B0%5D=gt%3A9