Repository navigation
[scheduler] Identify month-view dates and day buttons to screen readers - #24288
Conversation
Deploy previewBundle size
PerformanceNo regressions in 38 benchmarks · precise to ±11.1% (±68.5% at worst) · ran 7m 33s · details Check out the code infra dashboard for more information about this PR. |
|
|
||
| const hiddenCount = day.withPosition.length - visibleOccurrences.length; | ||
|
|
||
| const dateLabel = formatMonthAndDayOfMonth(locale, day.plainDate); |
There was a problem hiding this comment.
Would combining the weekday header with this month/day string put them in the wrong order in some locales?
There was a problem hiding this comment.
Right now the cell puts the weekday before the date in every locale, whereas Japanese expects the weekday last. I'll format the weekday, month, and day together so the active locale controls the order, and add tests for both English and Japanese.
|
Thank you so much for picking this up, @sviat-barbutsa, and for testing it with NVDA! Thanks as well to @RyanMcCleary for the clear report and for checking the preview: having a real screen reader user confirm the announcements is very valuable. I went through the PR. The approach works: the cells get their name from the hidden span in Chromium too, the new tests fail without the fix, the whole Bugs (2)1. 🟡 On the first day of a month, the button's name doesn't contain its visible textLocation: aria-label={localeText.goToDay(formatMonthAndDayOfMonth(locale, day.plainDate))}On day 1 the button shows the short month (
The tests don't catch it because they use May, where both forms are the same in English. Days 2 to 31 are fine: "15" is part of "Go to May 15". Failure scenario: A speech-control user (Voice Control, Dragon) says "click Sep 1" in the September grid, and nothing matches. Using the same short format for the name as the visible text would keep them aligned. The full date is still announced by the cell itself, right before the button. 2. ℹ️ The Week view header button, for consistencyLocation: This follows up on Ryan's question about the other views. The Week view doesn't have the same problem: its header button is named "Wed 2", so it already identifies the day, and its column header reads "Wednesday, July 2". It only lacks the action that the Month view button now announces ("Go to …"). Keeping this PR to the Month view is perfectly fine. If we want both views to match, it can be a small follow-up. Tests (2)1. 🟡 A first-of-month case on another monthLocation: A test on July 1 or September 1, checking that the button's name contains its visible text, would pin Bugs 1. 2. ℹ️ The clock changesLocation:
Simplifications (1)1. 🟡 The
|
|
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
|
Thanks, Rita. I updated the button label in |
|
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
|
Thanks @sviat-barbutsa, the day 1 label looks good now, and the PR is ready to go once it is updated with #24290 was merged in the meantime, so two things are needed:
I tried it locally and everything passes with those two changes. I will approve and merge as soon as it is updated. |
flaviendelangle
left a comment
There was a problem hiding this comment.
PR review
No merge-blocking findings. The focused MonthView and EventCalendar suites passed in jsdom: 112 tests passed, 3 skipped. No manual screen-reader testing was performed.
Bugs (0)
No findings.
Tests (0)
No findings.
Simplifications (1)
1. 🟡 Remove the unreachable date-label fallback
Location: MonthViewCell.tsx:218
const dateLabelId = schedulerId
? `${schedulerId}-MonthViewDate-${day.plainDate.toString()}`
: undefined;Both EventCalendar and EventCalendarProvider supply schedulerId through useId(). The fallback adds unnecessary branches for the label ID and column-header inclusion. This was already raised in the earlier review and remains unchanged, with no explicit agreement to defer it.
Failure scenario: Maintenance requires accounting for a missing-ID path that neither supported provider produces.
Fix: Construct dateLabelId directly and set includeColumnHeaderInLabel={false}.
Docs (0)
No findings.
Already tracked
- Keyboard access to month day buttons and event counts in cell names are covered by #24246 and implemented in #24338.
- Consistent action labels for Week-view header buttons were explicitly accepted as a possible follow-up.
Verdict
Approve after nits - only the previously raised fallback cleanup remains.
🤖 Review generated with Codex
Fixes #24279.
In the July month view, NVDA previously announced the July 2 cell only as "Wednesday", which could match any Wednesday in the grid. Its day-number button was also just named "2".
To make these unambiguous for screen reader users, I updated the accessible names across the month grid:
dateLocale, and the label prefix can be localized vialocaleText.goToDay.Testing
Screen reader (NVDA 2026.3.1 + Chrome 157 on Windows): Compared the original and patched builds using automated key presses and NVDA's queued speech. On July 2, the report-focus announcement changed from "Wednesday cell focused" to "Wednesday July 2 cell focused". Navigating to the day button in browse mode changed from "2 button" to "Go to July 2 button". I also verified June 29 in the July view and confirmed pressing Enter on the July 2 button still navigates to Day view.
Unit & browser tests: The Community Scheduler test suite passed in jsdom (782 tests) and Chromium (802 tests, running Playwright in UTC to match the test suite's timezone).
Build & docs: Verified the Scheduler package build and TypeScript type check. The model API documentation generator passed, while the component API docs generator reported the same 44 baseline missing-demo errors as clean
masteron Windows.I have followed (at least) the PR section of the contributing guide.