Skip to content
This repository was archived by the owner on Jun 28, 2026. It is now read-only.

Commit 9490bc8

Browse files
authored
Fix: ToggleButton accessibility attributes (#8068)
* Fix: ToggleButton accessibility tags * fix:using aria-label & aira-labelledby from props
1 parent aa59ba1 commit 9490bc8

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

components/lib/togglebutton/ToggleButton.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,14 +119,14 @@ export const ToggleButton = React.memo(
119119
onBlur: onBlur,
120120
onKeyDown: onKeyDown,
121121
tabIndex: tabIndex,
122-
role: 'switch',
123122
type: 'checkbox',
124-
'aria-pressed': props.checked,
125123
'aria-invalid': props.invalid,
126124
disabled: props.disabled,
127125
readOnly: props.readonly,
128126
value: props.checked,
129-
checked: props.checked
127+
checked: props.checked,
128+
'aria-label': props['aria-label'],
129+
'aria-labelledby': props['aria-labelledby']
130130
},
131131
ptm('input')
132132
);

0 commit comments

Comments
 (0)