Skip to content

Commit 56f1909

Browse files
docs: auto-slice documentation [skip ci]
1 parent 9d256b3 commit 56f1909

38 files changed

+325
-0
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
Buttons present unique accessibility challenges due to their diverse appearances (Strong, Default, Minimal, Brand, Negative), multiple layouts (text-only, icon-only, text+icon), and various states that must all communicate clearly to assistive technologies.
2+
3+
### Key Challenges
4+
5+
- Icon-only buttons require explicit accessible labels since visual icons alone provide no information to screen readers
6+
- Focus states must be clearly visible across all appearance variants and background contexts
7+
- Loading and disabled states must communicate programmatically, not just visually
8+
- Buttons on colored backgrounds require careful contrast management
9+
10+
### Critical Success Factors
11+
12+
1. Use semantic `<button>` element or `role="button"` with proper keyboard handling
13+
2. Ensure all interactive states have ≥3:1 contrast for focus indicators and ≥4.5:1 for text
14+
3. Provide `aria-label` for icon-only buttons and `aria-describedby` for additional context
15+
4. Communicate loading/disabled states via `aria-busy` and `aria-disabled` attributes
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Buttons must meet WCAG 2.2 Level AA compliance for keyboard operability, focus visibility, and semantic structure. For comprehensive accessibility guidance, see the [Orange Unified Design System Accessibility Overview](https://unified-design-system.orange.com/472794e18/p/88ebab-accessibility-and-sustainability).
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
- [Orange Accessibility Guidelines - Forms and Buttons](https://a11y-guidelines.orange.com/en/web/components-examples/forms/)
2+
- [W3C ARIA Button Pattern](https://www.w3.org/WAI/ARIA/apg/patterns/button/)
3+
- [WCAG 2.2 Understanding Focus Visible](https://www.w3.org/WAI/WCAG22/Understanding/focus-visible.html)
4+
- [Orange Design System - Accessibility & Sustainability](https://unified-design-system.orange.com/472794e18/p/88ebab-accessibility-and-sustainability)
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
### Structure & Labels
2+
3+
- [ ] **Semantic HTML**: Use native `<button>` element; avoid `<div>` or `<span>` with click handlers ([Orange Forms Guidelines](https://a11y-guidelines.orange.com/en/web/components-examples/forms/))
4+
- [ ] **Accessible names**: All buttons must have discernible text via visible label or `aria-label`
5+
- [ ] **Icon-only labeling**: Provide `aria-label` and tooltip for icon-only variants
6+
7+
### Visual Design
8+
9+
- [ ] **Focus indicator**: Visible focus ring with ≥3:1 contrast ratio against adjacent colors ([Orange Focus Guidelines](https://a11y-guidelines.orange.com/en/web/design/colors-and-contrasts/#focus-visibility))
10+
- [ ] **Text contrast**: Button text must have ≥4.5:1 contrast against button background
11+
- [ ] **Disabled styling**: Use reduced opacity (0.28) and `aria-disabled="true"`; avoid `disabled` attribute when possible
12+
13+
### Content
14+
15+
- [ ] **Button labels**: Use action verbs (Save, Submit, Delete); ❌ "Click here" / ✅ "Submit form"
16+
- [ ] **Concise text**: Keep labels under 3 words when possible; avoid truncation
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
- **2.1.1 Keyboard** (A): All button functionality operable via keyboard without timing requirements
2+
- **2.4.7 Focus Visible** (AA): Focus indicator visible with sufficient contrast on all button variants
3+
- **4.1.2 Name, Role, Value** (A): Buttons expose correct name, role, and state to assistive technologies
4+
- **1.4.3 Contrast (Minimum)** (AA): Text and icons have ≥4.5:1 contrast; UI components ≥3:1
5+
- **3.2.2 On Input** (A): Activating a button does not cause unexpected context changes without warning
6+
7+
For complete reference: [Orange Accessibility Guidelines - Interactive Components](https://a11y-guidelines.orange.com/en/web/components-examples/)
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
### Screen Reader Testing
2+
3+
- [ ] Test with NVDA (Windows), JAWS (Windows), VoiceOver (macOS/iOS), TalkBack (Android)
4+
- [ ] Verify button name announced, role identified as "button", states (disabled, loading) communicated
5+
6+
### Keyboard Testing
7+
8+
- [ ] Tab navigates to button, `Enter` and `Space` activate, focus ring visible with ≥3:1 contrast
9+
- [ ] Verify disabled buttons are either focusable with announcement or removed from tab order consistently
10+
11+
Resources: [Orange Accessibility Testing Guide](https://a11y-guidelines.orange.com/en/web/toolbox/)
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Changelog
2+
3+
| Date | Number | Notes | Designer |
4+
|------|--------|-------|----------|
5+
| Oct 10, 2025 | 3.2.0 | The specific component "On colored bg" has been split into two distinct components: <ul><li>A public version offering traditional management of dark and light modes <li>A private version (allowing the core team to nest the component with other components) offering customized mode management with four possible configurations: <ul><li>Always in light mode <li>Always in dark mode <li>Light to dark mode <li>Dark to light mode </ul><li>Consequently, for the private version, the name of the "Inverted color" variant has been replaced to "Mode control".</ul> | Maxime Tonnerre |
6+
| Sep 28, 2025 | 3.1.0 | <ul><li>Brand variant: New background and content color tokens added for hover/pressed/loading/focus states <li>The name of the "Hierarchy" variant has been replaced to "Appearance"</ul> | Maxime Tonnerre |
7+
| Jul 24, 2025 | 3.0.0 | <ul><li>New hierarchical variant: Brand → [Component tokens changelog 1.4.0](https://www.figma.com/design/Co2t6wHMf4GB9NJVGs2Hes/-OUDS-Core-Lib--Design-tokens?m=auto&node-id=9280-2568&t=HLVB4jOd35DWr8Bj-1) <li>Rounded corner property is now available → [Component tokens changelog 1.4.0](https://www.figma.com/design/Co2t6wHMf4GB9NJVGs2Hes/-OUDS-Core-Lib--Design-tokens?m=auto&node-id=9280-2568&t=HLVB4jOd35DWr8Bj-1) <li>Minimal variant: Color and width border tokens removed <li>Minimal variant: Color background tokens removed in the enabled state <li>Minimal variant: Color background tokens removed in the loading state <li>Minimal variant: Color background tokens removed in the disabled state</ul> | Maxime Tonnerre |
8+
| Jul 21, 2025 | 2.1.0 | <ul><li>Several design token updates: [Component tokens changelog 1.3.0](https://www.figma.com/design/Co2t6wHMf4GB9NJVGs2Hes/-OUDS-Core-Lib--Design-tokens?m=auto&node-id=9280-2568&t=HLVB4jOd35DWr8Bj-1) <li>Button: Expanded: The chevron is also present in the 'icon only' variant. The gap between these 2 elements is defined by a design token: ouds-action-button-space-column-gap-icon-chevron→ouds-space-column-gap-2xs</ul> | Maxime Tonnerre |
9+
| Apr 19, 2025 | 2.0.0 | <ul><li>Creation of "On colored bg" variant</ul> | Maxime Tonnerre |
10+
| Dec 5, 2024 | 1.0.0 | <ul><li>Component creation</ul> | Maxime Tonnerre |
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
| # | Element | Purpose | Optional |
2+
|---|---------|---------|----------|
3+
| 1 | Container | Defines the interactive boundary and visual shape of the button | N |
4+
| 2 | Text label | Communicates the action the button performs | Y |
5+
| 3 | Leading icon | Provides visual context or reinforces the action meaning | Y |
6+
| 4 | Loading indicator | Indicates an ongoing process after button activation | Y |
7+
| 5 | Focus ring | Shows keyboard focus state for accessibility | N |
8+
| 6 | Border | Defines button boundaries, especially for outline variants | Y |
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
**`Default`** Default buttons are used for actions which are not mandatory or essential for the user. Often screens will include multiple Outline buttons alongside one of the Full button.
2+
3+
**`Strong`** The Strong button on the page should be singular and prominent, ideally limited to one per view. It should be reserved for the most critical action, such as "Buy," "Save," "Submit," etc.
4+
5+
**`Brand`** A brand primary color alternative to the Strong button.
6+
To be used sparingly for high-value specific actions or to visually anchor a brand moment. Do not use it as the default primary button in your interfaces.
7+
8+
**`Minimal`** Minimal buttons are commonly used for actions that are considered less crucial. They can be used independently or together with a strong button.
9+
10+
**`Negative`** Negative buttons should be used sparingly to warn of a destructive action, for example, delete or remove, typically resulting in the opening of a confirmation dialog.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
**Do:** Use only one Strong or Brand button per view to establish a clear visual hierarchy and guide users to the primary action.
2+
**Don't:** Place multiple high-emphasis buttons together, which confuses users about which action is most important.
3+
4+
**Do:** Reserve Negative buttons exclusively for destructive actions like "Delete" or "Remove" that require user awareness of consequences.
5+
**Don't:** Use Negative styling for cancel actions or secondary dismissals that aren't truly destructive.
6+
7+
**Do:** Pair Default (outline) buttons with Strong buttons to create clear primary/secondary action relationships.
8+
**Don't:** Use Minimal buttons for important actions that users might miss due to low visual prominence.
9+
10+
**Do:** Use Brand buttons sparingly for specific brand moments or high-value marketing actions to maintain their impact.
11+
**Don't:** Use Brand buttons as the default primary throughout the interface, which dilutes brand emphasis.
12+
13+
**Do:** Match button appearance to action importance—Strong for primary, Default for secondary, Minimal for tertiary.
14+
**Don't:** Mix visual hierarchies inconsistently across similar workflows, creating unpredictable user experiences.

0 commit comments

Comments
 (0)