Skip to content

Commit 0bc7854

Browse files
Add role switch to Switch component
1 parent 79bb2dd commit 0bc7854

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

packages/mui-material/src/Switch/Switch.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,9 @@ const Switch = React.forwardRef(function Switch(inProps, ref) {
300300
input:
301301
typeof slotProps.input === 'function' ? slotProps.input(ownerState) : slotProps.input,
302302
}),
303+
input: {
304+
role: 'switch',
305+
},
303306
}}
304307
/>
305308
<TrackSlot {...trackSlotProps} />

0 commit comments

Comments
 (0)