Skip to content

Commit

Permalink
[Radio Button] Update Radio Button Website Doc: Selectable Components (
Browse files Browse the repository at this point in the history
…#3890)

* [Doc] Update Radio Button Website: Selectable Components

* Update src/pages/components/radio-button/usage.mdx

Co-authored-by: Lauren Rice <[email protected]>

* Update src/pages/components/radio-button/usage.mdx

Co-authored-by: Lauren Rice <[email protected]>

* Update src/pages/components/radio-button/accessibility.mdx

Co-authored-by: Lauren Rice <[email protected]>

* Update src/pages/components/radio-button/usage.mdx

---------

Co-authored-by: Lauren Rice <[email protected]>
  • Loading branch information
Kritvi-bhatia and laurenmrice authored Feb 8, 2024
1 parent 47593d0 commit f46250f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
9 changes: 5 additions & 4 deletions src/pages/components/radio-button/accessibility.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,11 @@ other accessibility considerations, some of which are described below.

### Keyboard interaction

A group of radio buttons takes a single tab stop. Carbon requires an item to be
selected by default, and this item will always take focus. The user changes the
selected radio button using the arrow keys (up/down or left/right). Pressing
`Tab` again will move focus out of the radio button group to the next component.
A group of radio buttons takes a single tab stop. Carbon does not require any
item to be selected by default, and the first item will always take focus in
case of no selection. The user changes the selected radio button using the arrow
keys (up/down or left/right). Pressing `Tab` again will move focus out of the
radio button group to the next component.

<Row>
<Column colLg={8}>
Expand Down
14 changes: 8 additions & 6 deletions src/pages/components/radio-button/usage.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@ buttons, a group label can be added.

1. **Group label (optional):** Describes the group of options or provides
guidance for making a selection.
2. **Radio button input:** A radio button indicating the appropriate state. By
default an option is selected.
2. **Radio button input:** Indicates the state of a radio button. By
default, no option will be preselected.
3. **Radio button label:** Describes the information you want to select or
unselect.

Expand Down Expand Up @@ -232,9 +232,11 @@ For further content guidance, see Carbon's
### States

The radio button input allows for two states: **unselected** and **selected**.
The default view of a radio button is having at least one radio button
preselected. Only one radio button should be selected at a time. When a user
chooses a new item, the previous choice is automatically deselected.
The default view of a radio button is having no radio button preselected. Only
one radio button should be selected at a time. When a user chooses a new item,
the previous choice is automatically deselected. If the user has already
selected an item but wants to deselect it, consider adding alternatives such as
an "other" or "none" option.

<Row>
<Column colLg={8}>
Expand Down Expand Up @@ -289,7 +291,7 @@ accessible click target.

#### Keyboard

One radio button should be selected by default. Users can navigate between radio
By default, no option will be preselected. Users can navigate between radio
button inputs by pressing `Up` or `Down` arrow keys. If a user lands on a radio
button set without a default indicator, they can press `Space` to select the
radio button or they can press an arrow key to select the next radio button. For
Expand Down

0 comments on commit f46250f

Please sign in to comment.