Skip to content

Conversation

@msmps
Copy link

@msmps msmps commented Feb 8, 2026

Description

  • Wrap pagination controls in <nav aria-label="Pagination">
  • Add role="status" and aria-live="polite" to "Showing X-Y of Z" text for page change announcements
  • Resolves WCAG 2.1 SC 1.3.1 (Info and Relationships) and SC 4.1.3 (Status Messages) violations

Problem

  1. Controls were wrapped in a generic <div>
  2. The "Showing X-Y of Z" status text wasn't announced when pages changed

Solution

Add semantic HTML and ARIA attributes:

  • <nav aria-label="Pagination">
  • role="status" - Identifies the "Showing X-Y of Z" text as a status region
  • aria-live="polite" - Announces page range changes without interrupting user

Testing

Verified with VoiceOver on macOS:

  1. Enable VoiceOver (Cmd + F5)
  2. Use rotor (Ctrl + Option + U) to open landmarks menu
  3. Confirm "Pagination, navigation" appears in the list
  4. Navigate between pages and confirm "Showing X-Y of Z" is announced

Question: Are we aligned on using <nav> over <div role="navigation">?

@msmps msmps changed the title fix(pagination): add ARIA attributes for screen reader accessibility fix(pagination): add aria attributes for screen reader accessibility Feb 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant