(
-
- {renderContent({
- labelId: titleId,
- control: {controlElement},
- })}
-
- )}
- />,
+
+ (
+
+ {renderContent({
+ labelId: titleId,
+ control: {controlElement},
+ })}
+
+ )}
+ />
+
,
true
);
}
diff --git a/src/switch-component.tsx b/src/switch-component.tsx
index 6c3c3bbdcc..d3535249b8 100644
--- a/src/switch-component.tsx
+++ b/src/switch-component.tsx
@@ -35,6 +35,8 @@ type PropsRender = {
children?: undefined;
'aria-labelledby'?: string;
'aria-label'?: string;
+ 'aria-controls'?: string;
+ 'aria-expanded'?: boolean;
dataAttributes?: DataAttributes;
};
@@ -48,6 +50,8 @@ type PropsChildren = {
render?: undefined;
'aria-labelledby'?: string;
'aria-label'?: string;
+ 'aria-controls'?: string;
+ 'aria-expanded'?: boolean;
dataAttributes?: DataAttributes;
};
@@ -159,6 +163,8 @@ const Switch = (props: PropsRender | PropsChildren): JSX.Element => {
aria-disabled={disabled}
aria-label={props['aria-label']}
aria-labelledby={props['aria-label'] ? undefined : labelId}
+ aria-controls={props['aria-controls']}
+ aria-expanded={props['aria-expanded']}
{...getPrefixedDataAttributes(props.dataAttributes, 'Switch')}
>
{props.render ? (
diff --git a/src/text-tokens.tsx b/src/text-tokens.tsx
index 97017c21e2..9c44091352 100644
--- a/src/text-tokens.tsx
+++ b/src/text-tokens.tsx
@@ -80,6 +80,7 @@ export type Dictionary = {
ratingVeryGoodLabel: string;
ratingQuantitativeLabel: string;
skipLinkNavLabel: string;
+ optionsAvailableBelowAnnouncement: string;
};
export type TextToken = Record;
@@ -658,3 +659,10 @@ export const skipLinkNavLabel: TextToken = {
de: 'Direkt zum Inhalt',
pt: 'Acesso rápido',
};
+
+export const optionsAvailableBelowAnnouncement: TextToken = {
+ es: 'Opciones disponibles a continuación',
+ en: 'Options available below',
+ de: 'Optionen unten verfügbar',
+ pt: 'Opções disponíveis a seguir',
+};