-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs(checkbox/radio): Fix accessibility warnings in code snippets
- Loading branch information
Showing
2 changed files
with
25 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,18 +7,21 @@ A stand-alone checkbox is used for a single option that the user can turn on or | |
<a href="https://www.nngroup.com/articles/checkboxes-vs-radio-buttons/" target="_blank">Reference</a> | ||
|
||
``` | ||
<Box tag="fieldset" between={2}> | ||
<Text bold size="medium"> | ||
Show me deals for: | ||
</Text> | ||
<Checkbox name="services" value="mobility" label="Mobility" /> | ||
<Checkbox name="services" value="internet" label="Internet" /> | ||
<Checkbox name="services" value="tv" label="TV" /> | ||
<Checkbox name="services" value="home-phone" label="Home Phone" /> | ||
</Box> | ||
<fieldset> | ||
<Box tag="fieldset" between={2}> | ||
<legend> | ||
<Text bold size="medium"> | ||
Show me deals for: | ||
</Text> | ||
</legend> | ||
<Checkbox name="services" value="mobility" label="Mobility" /> | ||
<Checkbox name="services" value="internet" label="Internet" /> | ||
<Checkbox name="services" value="tv" label="TV" /> | ||
<Checkbox name="services" value="home-phone" label="Home Phone" /> | ||
</Box> | ||
</fieldset> | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
lzcabrera
Author
Member
|
||
``` | ||
|
||
|
||
### Getting feedback for an unchecked checkbox | ||
|
||
Use the feedback and error props to give the user feedback regarding a missed checkbox by highlighting the label, checkbox element and adding an error message stating how to proceed. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Is this on purpose? There are nested
fieldsets
now...