feat: fix a11y issues in paginator component#668
Merged
Conversation
Contributor
Coverage report for library
Test suite run success1408 tests passing in 39 suites. Report generated by 🧪jest coverage report action from 83d4619 |
Contributor
Playwright test resultsDetails
|
Contributor
There was a problem hiding this comment.
Pull request overview
This PR improves the accessibility of CpsPaginatorComponent by adding semantic host attributes, better keyboard navigation/focus handling, and updated focus-visible styling, plus expands automated a11y and unit test coverage around the paginator behavior.
Changes:
- Adds
role="navigation"and default/customizablearia-labelhandling on the paginator host, plus pass-through props to improve disabled semantics. - Implements arrow-key navigation across page buttons and redirects focus away from boundary buttons when they become disabled.
- Updates paginator styling for focus-visible rings and rem-based sizing; enables the paginator route in Playwright accessibility checks and adds/extends unit tests.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
| projects/cps-ui-kit/src/lib/components/cps-paginator/cps-paginator.component.ts | Adds host semantics, aria-label handling, arrow-key navigation, focus redirection, and paginator pass-through props. |
| projects/cps-ui-kit/src/lib/components/cps-paginator/cps-paginator.component.html | Switches paginator rows binding to internal state and applies PT; hides redundant text from screen readers. |
| projects/cps-ui-kit/src/lib/components/cps-paginator/cps-paginator.component.scss | Adds focus-ring mixin usage and rem-based sizing for improved focus visibility and zoom behavior. |
| projects/cps-ui-kit/src/lib/components/cps-paginator/cps-paginator.component.spec.ts | Adds tests for host semantics, PT output, focus redirection, and arrow-key navigation behavior. |
| projects/cps-ui-kit/src/lib/components/cps-paginator/pipes/cps-paginate.pipe.spec.ts | Adds unit tests for pagination pipe behavior. |
| projects/composition/src/app/api-data/cps-paginator.json | Documents the new ariaLabel input in the composition API metadata. |
| playwright/cps-accessibility.spec.ts | Enables paginator route in Playwright accessibility coverage. |
Comments suppressed due to low confidence (1)
projects/cps-ui-kit/src/lib/components/cps-paginator/cps-paginator.component.ts:252
onRowsPerPageChangeupdates the PrimeNG paginator but does not update the component's ownrows/currentRowsstate. This can leave the wrapper component out of sync with its template bindings and with_syncRows()(which reads fromrows). Update the component state as well.
onRowsPerPageChange(rows: number) {
if (this.resetPageOnRowsChange) {
this.first = 0;
this.paginator.first = 0;
}
lukasmatta
reviewed
Jun 16, 2026
lukasmatta
previously approved these changes
Jun 17, 2026
lukasmatta
approved these changes
Jun 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixing accessibility issues in paginator component
Validation rules:
Validated using Playwright accessibility tests, Lighthouse tool, and manual checks including keyboard tab navigation and screen reader testing.
Full doc with rules
Checklist
Keyboard Navigation
All interactive elements are fully operable via keyboard only, including buttons, inputs, menus, dialogs, sliders, drag-and-drop, tree views, multi-selects, and composite widgets. No traps or dead ends.
Focus Management
Focus is visible, logical, moves in predictable order, trapped where necessary (modals/popovers), and restored after closing. Focus is perceivable in all interactive widgets.
Semantics / ARIA
Color / Contrast
Screen Reader / Assistive Technology
Responsive & Zoom
[N/A] Error Handling
[N/A] Dynamic Content / Updates
Interaction Feedback / States
[N/A] Authentication & Sensitive Actions
Predictable & Controllable UI
Release notes: