Skip to content

feat(pagination): improve keyboard navigation and accessibility - #2700

Open
SaiYugandhar03 wants to merge 5 commits into
siemens:mainfrom
SaiYugandhar03:pagination_a11y
Open

feat(pagination): improve keyboard navigation and accessibility#2700
SaiYugandhar03 wants to merge 5 commits into
siemens:mainfrom
SaiYugandhar03:pagination_a11y

Conversation

@SaiYugandhar03

@SaiYugandhar03 SaiYugandhar03 commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

💡 What is the current behavior?

The Previous (left arrow) button is not reachable via Tab, and screen readers incorrectly announce page buttons, ellipsis. This results in incorrect keyboard navigation and misleading accessibility announcements.

Jira ticket: IX-4345

🆕 What is the new behavior?

The Previous (left arrow) button is reachable via Tab, and screen readers correctly announce page buttons, ellipsis, and providing proper keyboard navigation and accurate accessibility announcements.

🏁 Checklist

A pull request can only be merged if all of these conditions are met (where applicable):

  • 🦮 Accessibility (a11y) features were implemented
  • 🗺️ Internationalization (i18n) - no hard coded strings
  • 📲 Responsiveness - components handle viewport changes and content overflow gracefully
  • 📕 Add or update a Storybook story
  • 📄 Documentation was reviewed/updated siemens/ix-docs
  • 🧪 Unit tests were added/updated and pass (pnpm test)
  • 📸 Visual regression tests were added/updated and pass (Guide)
  • 🧐 Static code analysis passes (pnpm lint)
  • 🏗️ Successful compilation (pnpm build, changes pushed)

👨‍💻 Help & support

Summary by CodeRabbit

  • Accessibility
    • Improved pagination semantics for screen readers and assistive technologies.
    • Added clear labels identifying page buttons and overflow navigation controls.
    • Marked the current page appropriately with aria-current="page".
    • Removed disabled previous and next buttons from keyboard navigation.
    • Improved navigation semantics for the pagination component.
  • Tests
    • Updated pagination accessibility checks to verify current-page labeling and prevent incorrect state announcements.

@netlify

netlify Bot commented Aug 5, 2026

Copy link
Copy Markdown

Deploy Preview for ix-storybook ready!

Name Link
🔨 Latest commit ede5fce
🔍 Latest deploy log https://app.netlify.com/projects/ix-storybook/deploys/6a7de0d62e0d6c00097b1b6f
😎 Deploy Preview https://deploy-preview-2700--ix-storybook.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

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

@changeset-bot

changeset-bot Bot commented Aug 5, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: ede5fce

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 5 packages
Name Type
@siemens/ix Patch
@siemens/ix-angular Patch
@siemens/ix-docs Patch
@siemens/ix-react Patch
@siemens/ix-vue Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: ba32adfe-120e-425e-bae5-5fad3478a72a

📥 Commits

Reviewing files that changed from the base of the PR and between 409625a and de09d14.

📒 Files selected for processing (2)
  • .changeset/accessibility-pagination-patch.md
  • packages/core/src/components/pagination/pagination.tsx

📝 Walkthrough

Walkthrough

Pagination now uses explicit page and overflow labels, aria-current="page" for the active page, navigation semantics, and keyboard exclusion for disabled boundary controls. The regression test and changeset record the updated behavior.

Changes

Pagination accessibility

Layer / File(s) Summary
Pagination control semantics
packages/core/src/components/pagination/pagination.tsx, packages/core/src/components/pagination/test/pagination.ct.ts, .changeset/accessibility-pagination-patch.md
Page buttons use explicit labels and aria-current="page" for the active page. Overflow buttons identify their target pages and use shared jump-distance logic. The host uses navigation semantics. Disabled boundary buttons receive tabIndex={-1}. The regression test and patch changeset reflect the updated accessibility behavior.

Estimated code review effort: 2 (Simple) | ~10 minutes

Mergeability Score: 🔵 Low · up to de09d

The pagination changes improve keyboard navigation and screen-reader announcements, but several new accessible labels remain hard-coded in English, which can produce mixed-language output for non-English users. The PR is mergeable with explicit owner awareness or follow-up to localize those labels.

Suggested reviewers: nuke-ellington

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main changes to pagination keyboard navigation and accessibility.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@SaiYugandhar03
SaiYugandhar03 marked this pull request as ready for review August 11, 2026 05:04

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@packages/core/src/components/pagination/pagination.tsx`:
- Around line 203-210: Update the overflow button labels and handlers in the
pagination component so the announced page jump matches the actual selected-page
movement at boundaries; either compute each button’s target delta for its
aria-label or make both handlers consistently move three pages, while preserving
the existing pagination behavior and tests.
- Around line 168-171: Localize the accessible labels and announcements
generated by the pagination component, including the “Go to” page label, both
jump announcements, and the “Pagination” label, instead of concatenating
hard-coded English with i18nPage. Reuse the existing localization mechanism or
add localized inputs, and if public props are introduced, update their JSDoc,
`@since` metadata, Storybook stories, and test-app examples.
- Around line 168-171: Update the selected-page attribute construction in the
pagination button rendering to remove aria-selected, retaining
aria-current="page" for the current button. Adjust the pagination component test
assertions to verify aria-current="page" instead of aria-selected.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 7f16b75a-61fe-4776-98a8-260eb781c6fb

📥 Commits

Reviewing files that changed from the base of the PR and between 5c43ed5 and 95976a3.

📒 Files selected for processing (2)
  • packages/core/src/components/pagination/pagination.tsx
  • packages/core/src/components/pagination/test/pagination.ct.ts

Comment thread packages/core/src/components/pagination/pagination.tsx Outdated
Comment thread packages/core/src/components/pagination/pagination.tsx
@SaiYugandhar03
SaiYugandhar03 requested a review from a team as a code owner August 11, 2026 14:48

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@packages/core/src/components/pagination/pagination.tsx`:
- Around line 168-169: Add a changeset for the affected pagination package
documenting the public accessibility behavior changes implemented around the
pagination component, including aria-current, accessible labels, navigation
semantics, and keyboard focus behavior.
- Line 188: Reuse the jump value declared in the pagination component’s jump
calculation in both backward and forward overflow handlers, replacing their
duplicate 2 * pageCount + 1 expressions. Ensure announced and selected
destinations use this shared jump value consistently.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 043ffa93-26ec-4ab4-b11f-aa4d4f4ed33d

📥 Commits

Reviewing files that changed from the base of the PR and between 95976a3 and 409625a.

📒 Files selected for processing (2)
  • packages/core/src/components/pagination/pagination.tsx
  • packages/core/src/components/pagination/test/pagination.ct.ts

Comment thread packages/core/src/components/pagination/pagination.tsx
Comment thread packages/core/src/components/pagination/pagination.tsx
@sonarqubecloud

Copy link
Copy Markdown

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