Skip to content

Scheduling infrastructure for absolutely everyone.

fix(a11y): added description for icon buttons (#17184)

Maximilian Franzkec7edfd5bd323
diff --git a/packages/features/bookings/Booker/components/Header.tsx b/packages/features/bookings/Booker/components/Header.tsx
index bf037089087..24644cb7941 100644
--- a/packages/features/bookings/Booker/components/Header.tsx
+++ b/packages/features/bookings/Booker/components/Header.tsx
@@ -179,17 +179,32 @@ const LayoutToggle = ({
return [
{
value: BookerLayouts.MONTH_VIEW,
- label: <Icon name="calendar" width="16" height="16" />,
+ label: (
+ <>
+ <Icon name="calendar" width="16" height="16" />
+ <span className="sr-only">${t("switch_monthly")}</span>
+ </>
+ ),
tooltip: t("switch_monthly"),
},
{
value: BookerLayouts.WEEK_VIEW,
- label: <Icon name="grid-3x3" width="16" height="16" />,
+ label: (
+ <>
+ <Icon name="grid-3x3" width="16" height="16" />
+ <span className="sr-only">${t("switch_weekly")}</span>
+ </>
+ ),
tooltip: t("switch_weekly"),
},
{
value: BookerLayouts.COLUMN_VIEW,
- label: <Icon name="columns-3" width="16" height="16" />,
+ label: (
+ <>
+ <Icon name="columns-3" width="16" height="16" />
+ <span className="sr-only">${t("switch_columnview")}</span>
+ </>
+ ),
tooltip: t("switch_columnview"),
},
].filter((layout) => enabledLayouts?.includes(layout.value as BookerLayouts));