Skip to content

[@mantine/schedule] WeekView: Fix weekday buttons accessible name not containing visible text - #9401

Open
okeken wants to merge 1 commit into
mantinedev:masterfrom
okeken:fix/schedule-weekview-weekday-accessible-name
Open

okeken wants to merge 1 commit into
mantinedev:masterfrom
okeken:fix/schedule-weekview-weekday-accessible-name

Conversation

@okeken

@okeken okeken commented Nov 10, 2026

Copy link
Copy Markdown

Fixes #9397

Problem

The weekday header buttons in WeekView show "Mon 9", but they had a hard-coded aria-label like "Weekday 2026-11-09". Their accessible name did not contain the visible text (WCAG 2.5.3 Label in Name, axe label-content-name-mismatch), so speech-input users could not activate a button by saying what they see. The label was set after the Styles API attributes, so apps could not override it.

Changes

  • Removed the aria-label from the weekday buttons. They are now named by their visible text (e.g. "Mon 9"), which follows locale and weekdayFormat.
  • labels.weekday is no longer used. It stays in ScheduleLabels, marked @deprecated, so existing labels objects still type-check.
  • An aria-label passed with attributes={{ weekViewDayLabel: { ... } }} is now applied.
  • Updated the WeekView accessibility docs and removed weekday from the localization demo.

Behavior change

The weekday button's accessible name changes from "Weekday 2025-11-03" to its visible text. No props, types or Styles API selectors change. Tests that find the button by the old name need to be updated.

Screen readers no longer hear the month and year on these buttons; the schedule header shows them. If you'd rather keep the full date for screen readers, I can add it as visually hidden text after the visible text (e.g. "Mon 9 November 9, 2026"), which still meets 2.5.3.

Tests

  • Updated the existing assertions to the new names.
  • Added two tests: weekday buttons have no aria-label and are named by their visible text, and an aria-label passed through attributes is applied. Both fail without the fix.
  • npm run jest @mantine/schedule: 104 suites, 2033 tests pass. oxlint, oxfmt, root tsc --noEmit and npm run build pass.

@rtivital rtivital added the Verified Reviewed and verified PR label Nov 12, 2026
@rtivital

Copy link
Copy Markdown
Member

🤖 Beep boop, Codex (GPT-6 Sol) speaking! Pull request is perfect, no changes needed! Verified label added.

Reviewed SHA: ed4d077.

Please do not update PR after it got verified, I will need to run verification again if you do that.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Verified Reviewed and verified PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

@mantine/schedule WeekView: weekday header button aria-label does not contain its visible text (WCAG 2.5.3)

2 participants