Skip to content

feat: fix a11y issues in datepicker component#653

Open
fateeand wants to merge 5 commits into
masterfrom
559-fix-a11y-issues-in-datepicker-component
Open

feat: fix a11y issues in datepicker component#653
fateeand wants to merge 5 commits into
masterfrom
559-fix-a11y-issues-in-datepicker-component

Conversation

@fateeand
Copy link
Copy Markdown
Collaborator

@fateeand fateeand commented Jun 3, 2026

Fixing accessibility issues in datepicker 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:

Component aria-roles button-name color-contrast label tabindex target-size
Datepicker - - - - - -

State after:

Component aria-roles button-name color-contrast label tabindex target-size
Datepicker

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

    • Semantic HTML is used correctly.
    • ARIA roles, states, and properties are applied only when needed.
    • All form fields, tables, and widgets (including autocomplete, tree selects, tree tables, drag-and-drop, sliders, and multi-selects) are properly labeled and accessible.
  • Color / Contrast

    • Text and interactive elements meet contrast requirements (≥4.5:1 normal text, ≥3:1 large text).
    • Focus and selection indicators are visually perceivable.
    • Color is not the only indicator of state.
  • Screen Reader / Assistive Technology

    • All content, labels, and dynamic updates are perceivable via screen readers.
    • Live regions announce status messages, alerts, modals, notifications, and dynamic changes.
    • Interactive widgets provide proper announcements of selection and updates.
  • Responsive & Zoom

    • Components function correctly and remain readable at all viewport sizes and up to 200% zoom, including mobile and touch devices.
    • Prefer em/rem units over px where scaling is required.
  • Error Handling

    • Errors are clearly identified visually and programmatically.
    • Form inputs use aria-describedby or aria-invalid for inline messages.
    • Instructions and suggestions are accessible.
  • Dynamic Content / Updates

    • Status updates, alerts, notifications, and modals use live regions.
    • Updates do not disrupt focus or user control unexpectedly.
  • Interaction Feedback / States

    • All interactive states (hover, focus, active, disabled, drag-and-drop, reordering, multi-select) are visually perceivable.
  • Authentication & Sensitive Actions

    • Inputs and actions involving sensitive data provide accessible instructions, feedback, and error messages.
  • Predictable & Controllable UI

    • Components behave consistently and predictably.
    • Popups, modals, autocomplete suggestions, drag-and-drop, and dynamic content allow user control.

Additional changes

Fixing a11y-matrix-generator.js which was broken by cps-accessibility.spec.ts changes in the PR


Release notes:

  • Fix a11y issues in datepicker component

Copilot AI review requested due to automatic review settings June 3, 2026 17:19
@fateeand fateeand requested a review from lukasmatta as a code owner June 3, 2026 17:19
@fateeand fateeand linked an issue Jun 3, 2026 that may be closed by this pull request
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 3, 2026

Coverage report for library

St.
Category Percentage Covered / Total
🔴 Statements 47.52% 3493/7351
🔴 Branches 43% 1555/3616
🔴 Functions 46.52% 655/1408
🔴 Lines 48.05% 3253/6770

Test suite run success

1153 tests passing in 34 suites.

Report generated by 🧪jest coverage report action from fc5f432

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 3, 2026

Playwright test results

passed  82 passed

Details

stats  82 tests across 4 suites
duration  2 minutes, 49 seconds
commit  fc5f432
info  For details, download the Playwright report

@fateeand fateeand changed the title Fix a11y issues in datepicker component feat: fix a11y issues in datepicker component Jun 3, 2026
@lukasmatta lukasmatta requested a review from Copilot June 4, 2026 10:03
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 13 out of 13 changed files in this pull request and generated 2 comments.

Comment thread projects/cps-ui-kit/src/lib/components/cps-datepicker/cps-datepicker.component.ts Outdated
Comment thread projects/cps-ui-kit/src/lib/components/cps-datepicker/cps-datepicker.component.ts Outdated
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.

Fix a11y issues in datepicker component

2 participants