Open
Conversation
Coverage report for library
Test suite run success427 tests passing in 21 suites. Report generated by 🧪jest coverage report action from 5975ace |
Playwright test resultsDetails
|
Contributor
There was a problem hiding this comment.
Pull request overview
This PR addresses accessibility issues in the cps-button component by ensuring it has a discernible accessible name, improving loading-state semantics, and adding stronger visible focus/keyboard interaction styling. It also updates the composition/demo pages to use ariaLabel for icon-only buttons and adjusts spacing units to improve zoom/responsiveness.
Changes:
- Add
ariaLabelsupport and ARIA attributes (aria-label,aria-busy,aria-disabled,aria-hidden) to improve screen reader behavior, especially during loading. - Add keyboard “Enter pressed” visual state handling (
enterActive) and focus-visible styling enhancements. - Update composition pages (demo app) styles and icon-only button examples to align with accessibility/zoom requirements.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| projects/cps-ui-kit/src/lib/components/cps-button/cps-button.component.ts | Adds ariaLabel input and Enter key active-state tracking methods. |
| projects/cps-ui-kit/src/lib/components/cps-button/cps-button.component.html | Applies ARIA attributes, hides decorative elements from AT, and binds key handlers / active class. |
| projects/cps-ui-kit/src/lib/components/cps-button/cps-button.component.scss | Adds focus-visible ring styling and keyboard-active styling; converts several sizes to rem. |
| projects/composition/src/app/pages/button-page/button-page.component.html | Supplies ariaLabel for icon-only button examples. |
| projects/composition/src/app/pages/button-page/button-page.component.scss | Converts px→rem and adjusts margins for better zoom/responsiveness. |
| projects/composition/src/app/pages/tooltip-page/tooltip-page.component.scss | Converts px→rem and adds margins for layout at higher zoom. |
| projects/composition/src/app/pages/notification-page/notification-page.component.scss | Converts px→rem and adds margins for layout at higher zoom. |
| projects/composition/src/app/pages/menu-page/menu-page.component.scss | Converts px→rem and adds margins for layout at higher zoom. |
| projects/composition/src/app/pages/dialog-page/dialog-page.component.scss | Converts px→rem and adds margins for layout at higher zoom. |
| projects/composition/src/app/pages/chip-page/chip-page.component.scss | Converts px→rem and adds margins for layout at higher zoom. |
projects/cps-ui-kit/src/lib/components/cps-button/cps-button.component.html
Outdated
Show resolved
Hide resolved
projects/cps-ui-kit/src/lib/components/cps-button/cps-button.component.ts
Show resolved
Hide resolved
projects/cps-ui-kit/src/lib/components/cps-button/cps-button.component.ts
Show resolved
Hide resolved
projects/cps-ui-kit/src/lib/components/cps-button/cps-button.component.scss
Outdated
Show resolved
Hide resolved
projects/cps-ui-kit/src/lib/components/cps-button/cps-button.component.scss
Outdated
Show resolved
Hide resolved
projects/cps-ui-kit/src/lib/components/cps-button/cps-button.component.html
Outdated
Show resolved
Hide resolved
| } | ||
|
|
||
| @include focus-ring(0.25rem, 0.3125rem); | ||
|
|
Collaborator
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 button 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
Playwright axe-core validation results:
State before:
State after:
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: