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

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 #20703
This commit is contained in:
Ahmad Yasser
2026-02-09 06:13:27 +00:00
committed by GitHub
parent 0ec07b0005
commit 3052cf5157
2 changed files with 9 additions and 1 deletions
@@ -234,7 +234,14 @@ const LayoutToggle = ({
// the layout can be toggled via props in the booker atom
if (isPlatform) return null;
return <ToggleGroup onValueChange={onLayoutToggle} defaultValue={layout} options={layoutOptions} />;
return (
<ToggleGroup
onValueChange={onLayoutToggle}
defaultValue={layout}
aria-label={t("layout")}
options={layoutOptions}
/>
);
};
const LayoutToggleWithData = ({
@@ -17,6 +17,7 @@ export const TimeFormatToggle = ({ customClassName }: { customClassName?: string
}}
defaultValue={timeFormat}
value={timeFormat}
aria-label={t("time_format")}
options={[
{ value: TimeFormat.TWELVE_HOUR, label: t("12_hour_short") },
{ value: TimeFormat.TWENTY_FOUR_HOUR, label: t("24_hour_short") },