Skip to content

feat: add ARIA labels to time format and layout toggle controls#27760

Merged
dhairyashiil merged 1 commit intocalcom:mainfrom
AhmadYasser1:fix/aria-labels-time-format-toggle
Feb 9, 2026
Merged

feat: add ARIA labels to time format and layout toggle controls#27760
dhairyashiil merged 1 commit intocalcom:mainfrom
AhmadYasser1:fix/aria-labels-time-format-toggle

Conversation

@AhmadYasser1
Copy link
Copy Markdown
Contributor

Summary

  • Adds aria-label to the time format toggle (TimeFormatToggle) and the layout toggle (LayoutToggle) on the booking page
  • Screen readers can now properly identify these radio groups and announce their purpose

Changes

  • packages/features/bookings/components/TimeFormatToggle.tsx: Add aria-label={t("time_format")} to the ToggleGroup
  • packages/features/bookings/components/Header.tsx: Add aria-label={t("layout")} to the layout ToggleGroup

Root Cause

The Radix UI ToggleGroup renders as a radiogroup role element, but without an aria-label, screen readers cannot convey the purpose of these controls. This violates WCAG 4.1.2 (Name, Role, Value).

Fix

Pass aria-label using existing translation keys ("time_format" → "Time format", "layout" → "Layout") to the ToggleGroup components. The prop flows through to the Radix root element via the spread props.

Test plan

  • Verify the time format toggle has aria-label="Time format" in the DOM
  • Verify the layout toggle has aria-label="Layout" in the DOM
  • Screen reader announces "Time format" when focusing the 12h/24h toggle
  • Screen reader announces "Layout" when focusing the month/week/column toggle
  • No visual changes — purely accessibility improvement
  • Biome lint passes — no new warnings
  • Pre-existing type errors only (confirmed unrelated to changes)

Fixes #20703

Add aria-label to the TimeFormatToggle and LayoutToggle components
on the booking page so screen readers can identify these radio groups.
Uses existing translation keys "time_format" and "layout".

Fixes calcom#20703
@github-actions github-actions bot added Low priority Created by Linear-GitHub Sync ui area: UI, frontend, button, form, input ✨ feature New feature or request labels Feb 8, 2026
@AhmadYasser1 AhmadYasser1 marked this pull request as ready for review February 8, 2026 23:32
@graphite-app graphite-app bot added the community Created by Linear-GitHub Sync label Feb 8, 2026
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

No issues found across 2 files

Copy link
Copy Markdown
Member

@dhairyashiil dhairyashiil left a comment

Choose a reason for hiding this comment

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

Thank you for the contribution

@dhairyashiil dhairyashiil enabled auto-merge (squash) February 9, 2026 05:06
@dhairyashiil dhairyashiil added the run-ci Approve CI to run for external contributors label Feb 9, 2026
@dhairyashiil dhairyashiil merged commit 3052cf5 into calcom:main Feb 9, 2026
143 of 154 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community Created by Linear-GitHub Sync ✨ feature New feature or request Low priority Created by Linear-GitHub Sync ready-for-e2e run-ci Approve CI to run for external contributors size/S ui area: UI, frontend, button, form, input

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add proper ARIA labels to time format controls

2 participants