|
@@ -197,6 +197,10 @@ import { Switch } from '@douyinfe/semi-ui';
|
|
- Switch has a `switch` role, when checked is true, `aria-checked` will be automatically set to true, and vice versa.
|
|
- Switch has a `switch` role, when checked is true, `aria-checked` will be automatically set to true, and vice versa.
|
|
- As a form field, it should have a Label, which will be automatically brought on when you use Form.Switch.
|
|
- As a form field, it should have a Label, which will be automatically brought on when you use Form.Switch.
|
|
- If you use Switch alone, it is recommended to use `aria-label` to describe the current label function.
|
|
- If you use Switch alone, it is recommended to use `aria-label` to describe the current label function.
|
|
|
|
+
|
|
|
|
+### Keyboard and Focus
|
|
|
|
+- Keyboard users can use `Tab` and `Shift + Tab` to switch focus.
|
|
|
|
+- When focusing, you can switch on or off by pressing the `Space` key.
|
|
## Design Tokens
|
|
## Design Tokens
|
|
|
|
|
|
<DesignToken/>
|
|
<DesignToken/>
|