Skip to content

Commit 0e00d9e

Browse files
committed
fix(Switch): change wrapper tag to label
1 parent 97c1c50 commit 0e00d9e

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

.changeset/nasty-chairs-suffer.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@cube-dev/ui-kit': patch
3+
---
4+
5+
Switch the default Switch wrapper tag to label for better accessibility and e2e testing.

src/components/fields/Switch/Switch.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ import { useFieldProps, useFormProps, wrapWithField } from '../../form';
2727
import { LoadingIcon } from '../../../icons';
2828

2929
const SwitchWrapperElement = tasty({
30+
as: 'label',
3031
qa: 'SwitchWrapper',
3132
styles: {
3233
display: 'flex',

0 commit comments

Comments
 (0)