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:
@@ -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") },
|
||||
|
||||
Reference in New Issue
Block a user