Skip to content

Commit 1d695df

Browse files
committed
feat: a11y and disabled button
1 parent 1862822 commit 1d695df

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

content/en/docs/forms/button.mdx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,12 +127,12 @@ end
127127

128128
**Do's ✅**
129129

130-
- Use descriptive labels that clearly communicate the action
130+
- Use descriptive labels that clearly communicate the action [^describe-buttons]
131131
- Provide visual feedback for all interactive states
132132
- Ensure keyboard navigation works properly
133133
- Include loading states for asynchronous actions
134+
- Don't pass the `disabled` attribute to buttons, instead use `aria-disabled`. You would risk disrupting the keyboard navigation flow as this would reset focus on the button.
134135
- Use descriptive loading states with both text and visual indicators
135-
- Maintain ARIA labels and roles
136136

137137
**Don'ts ❌**
138138

@@ -423,3 +423,7 @@ These design tokens follow the [Design Tokens Format](https://design-tokens.gith
423423
- [Style Dictionary](https://styledictionary.com/)
424424
- [Button (Carbon Design System)](https://carbondesignsystem.com/components/button/usage/)
425425
- [Button (Material Design)](https://m3.material.io/components/all-buttons)
426+
427+
### Footnotes
428+
429+
[^describe-buttons]: [Descriptive buttons](https://primer.style/guides/accessibility/descriptive-buttons)

0 commit comments

Comments
 (0)