Skip to content

fix(v21): mark disabled datepicker cells as aria-disabled - #906

Merged
fateeand merged 12 commits into
v21from
fix/905-datepicker-aria-disabled-v21
Oct 30, 2026
Merged

fateeand merged 12 commits into
v21from
fix/905-datepicker-aria-disabled-v21

Conversation

@fateeand

Copy link
Copy Markdown
Collaborator

Closes #905

v21 counterpart of #892. On master the fix patches the vendored PrimeNG datepicker; v21 uses the primeng package, so CpsDatepickerComponent instead patches the rendered calendar DOM (via a MutationObserver on the calendar overlay while it is open):

  • day, month and year cells get role="button", and aria-disabled="true" when they carry p-disabled
  • the day <td> gets aria-disabled="true" too (empty other-month cells have no day <span>, so they are left alone)
  • month and year cells get an aria-label with their visible text, so the hidden live region in the selected cell doesn't double the accessible name

Tests: new unit tests render the real calendar; the Playwright min-date assertions from #892 are ported.

Depends on #903 - this branch is based on it, so the diff shows its commits until #903 is merged. Merge #903 first.

Verified: typecheck, lint, datepicker unit tests, Playwright datepicker spec, and the datepicker axe scans (component and composition page, desktop and mobile).

@github-actions

github-actions Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Coverage report for library

St.❔
Category Percentage Covered / Total
🟢 Statements 98.82% 7644/7735
🟢 Branches 93.86% 3942/4200
🟢 Functions 97.57% 1405/1440
🟢 Lines 99.34% 7091/7138

Test suite run success

3285 tests passing in 76 suites.

Report generated by 🧪jest coverage report action from 9af4122

@fateeand

Copy link
Copy Markdown
Collaborator Author

Note for reviewers: this PR is based on the #903 branch, so its diff and commit list currently include the #903 backport commits. The only change belonging to this PR is the last commit, fix: mark disabled datepicker cells as aria-disabled (v21 backport of #892).

Merge #903 first, then rebase this PR onto v21 so the #903 commits drop out of the diff.

@github-actions

github-actions Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Playwright test results

passed  986 passed

Details

stats  986 tests across 35 suites
duration  28 minutes, 28 seconds
commit  9af4122
info  For details, download the Playwright report

@fateeand
fateeand force-pushed the fix/905-datepicker-aria-disabled-v21 branch from 2d41f27 to 5ca5c8d Compare October 29, 2026 18:46

@lukasmatta lukasmatta left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

nice work, left one minor comment

Comment thread projects/cps-ui-kit/src/lib/components/cps-datepicker/cps-datepicker.component.ts Outdated
@fateeand
fateeand merged commit 4e73a46 into v21 Oct 30, 2026
10 checks passed
@fateeand
fateeand deleted the fix/905-datepicker-aria-disabled-v21 branch October 30, 2026 12:24
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.

Mark disabled datepicker cells as aria-disabled in v21

2 participants