Skip to content

Commit

Permalink
Update usage.mdx (#3256)
Browse files Browse the repository at this point in the history
* Update usage.mdx

In the "Content" section the "Label text" that is used in the examples is referred to as "Heading" which is confusing. Attempting to clarify label vs action text with this proposed edit.

* Update usage.mdx

Changing "can" to "must" since the label is required for accessibility.

* chore(format): fix format error

Co-authored-by: TJ Egan <tw15egan@gmail.com>
  • Loading branch information
contentdesi and tw15egan authored Nov 17, 2022
1 parent 1355902 commit 0dddfcf
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions src/pages/components/toggle/usage.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -97,19 +97,20 @@ user “flips the switch”. They are commonly used for “on/off” switches.

## Content

#### Heading
#### Label text

A heading may accompany a toggle to further clarify on the action the toggle
will perform.
Label text must accompany a toggle to further clarify the action that the toggle
performs.

#### Labels
#### Action text

Use labels with a toggle so the action is clear. Labels should be three words or
less and appear on the side of a toggle.
Use text to describe the binary action of toggle so that the action is clear.
Action text must be three words or less and is displayed on the side of a
toggle.

#### Language

Use adjectives rather than verbs to describe labels and the state of the object
Use adjectives rather than verbs to describe actions and the state of the object
affected.

## Variants
Expand Down

1 comment on commit 0dddfcf

@vercel
Copy link

@vercel vercel bot commented on 0dddfcf Nov 17, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.