Skip to content

Commit cb0d969

Browse files
authored
docs(a11y): a11y migration docs with JIRA issues (#6159)
* chore: script update nav * docs(a11y): updated migration docs * docs(a11y): added a11y issues table to a11y migration docs * docs(a11y): picker migration docs * Revert "docs(a11y): picker migration docs" This reverts commit 0101683. * docs(a11y): fixed divider regression * docs(a11y): updated for illustrated message * Delete .cursor/rules/accessibility-migration-analysis.mdc
1 parent c2bba36 commit cb0d969

10 files changed

Lines changed: 638 additions & 182 deletions

File tree

CONTRIBUTOR-DOCS/03_project-planning/03_components/README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,7 @@
2727
- Asset
2828
- [Asset migration roadmap](asset/rendering-and-styling-migration-analysis.md)
2929
- Avatar
30-
- [Avatar accessibility migration analysis](avatar/accessibility-migration-analysis.md)
31-
- [Avatar — 2nd-Gen Migration Plan](avatar/migration-plan.md)
32-
- [Avatar migration roadmap](avatar/rendering-and-styling-migration-analysis.md)
30+
- [Avatar accessibility migration analysis](avatar/rendering-and-styling-migration-analysis.md)
3331
- Badge
3432
- [Badge accessibility migration analysis](badge/accessibility-migration-analysis.md)
3533
- [Badge migration roadmap](badge/rendering-and-styling-migration-analysis.md)
@@ -41,6 +39,8 @@
4139
- [Checkbox migration roadmap](checkbox/rendering-and-styling-migration-analysis.md)
4240
- Color Field
4341
- [Color field migration roadmap](color-field/rendering-and-styling-migration-analysis.md)
42+
- Color Loupe
43+
- [Color loupe accessibility migration analysis](color-loupe/accessibility-migration-analysis.md)
4444
- Divider
4545
- [Divider accessibility migration analysis](divider/accessibility-migration-analysis.md)
4646
- [Divider migration roadmap](divider/rendering-and-styling-migration-analysis.md)
@@ -53,6 +53,7 @@
5353
- Help Text
5454
- [Help text migration roadmap](help-text/rendering-and-styling-migration-analysis.md)
5555
- Illustrated Message
56+
- [Illustrated message accessibility migration analysis](illustrated-message/accessibility-migration-analysis.md)
5657
- [Illustrated message migration roadmap](illustrated-message/rendering-and-styling-migration-analysis.md)
5758
- Infield Button
5859
- [In-field button migration roadmap](infield-button/rendering-and-styling-migration-analysis.md)
@@ -69,6 +70,7 @@
6970
- Picker Button
7071
- [Picker button migration roadmap](picker-button/rendering-and-styling-migration-analysis.md)
7172
- Progress Bar
73+
- [Progress bar accessibility migration analysis](progress-bar/accessibility-migration-analysis.md)
7274
- [Progress bar migration roadmap](progress-bar/rendering-and-styling-migration-analysis.md)
7375
- Progress Circle
7476
- [Progress circle accessibility migration analysis](progress-circle/accessibility-migration-analysis.md)

CONTRIBUTOR-DOCS/03_project-planning/03_components/avatar/rendering-and-styling-migration-analysis.md

Lines changed: 122 additions & 179 deletions
Large diffs are not rendered by default.

CONTRIBUTOR-DOCS/03_project-planning/03_components/badge/accessibility-migration-analysis.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
- [ARIA and WCAG context](#aria-and-wcag-context)
1919
- [Pattern in the APG](#pattern-in-the-apg)
2020
- [Guidelines that apply](#guidelines-that-apply)
21+
- [Related 1st-gen accessibility (Jira)](#related-1st-gen-accessibility-jira)
2122
- [Recommendations: `<swc-badge>`](#recommendations-swc-badge)
2223
- [ARIA roles, states, and properties](#aria-roles-states-and-properties)
2324
- [Shadow DOM and cross-root ARIA Issues](#shadow-dom-and-cross-root-aria-issues)
@@ -67,6 +68,14 @@ This doc tells you how **`swc-badge`** should work for **accessibility**. It mat
6768

6869
---
6970

71+
## Related 1st-gen accessibility (Jira)
72+
73+
| Jira | Type | Status (snapshot) | Resolution (snapshot) | Summary |
74+
|------|------|-------------------|-------------------------|---------|
75+
| [SWC-1136](https://jira.corp.adobe.com/browse/SWC-1136) | Bug | To Do | Unresolved | [Accessibility] Text content lacks 4.5:1 contrast ratio — `sp-badge` (semantic) |
76+
77+
---
78+
7079
## Recommendations: `<swc-badge>`
7180

7281
### ARIA roles, states, and properties
Lines changed: 146 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,146 @@
1+
<!-- Generated breadcrumbs - DO NOT EDIT -->
2+
3+
[CONTRIBUTOR-DOCS](../../../README.md) / [Project planning](../../README.md) / [Components](../README.md) / Color Loupe / Color loupe accessibility migration analysis
4+
5+
<!-- Document title (editable) -->
6+
7+
# Color loupe accessibility migration analysis
8+
9+
<!-- Generated TOC - DO NOT EDIT -->
10+
11+
<details open>
12+
<summary><strong>In this doc</strong></summary>
13+
14+
- [Overview](#overview)
15+
- [Also read](#also-read)
16+
- [What it is](#what-it-is)
17+
- [ARIA and WCAG context](#aria-and-wcag-context)
18+
- [Pattern in the APG](#pattern-in-the-apg)
19+
- [Guidelines that apply](#guidelines-that-apply)
20+
- [Related 1st-gen accessibility (Jira)](#related-1st-gen-accessibility-jira)
21+
- [Recommendations: `<swc-color-loupe>`](#recommendations-swc-color-loupe)
22+
- [ARIA roles, states, and properties](#aria-roles-states-and-properties)
23+
- [Shadow DOM and cross-root ARIA Issues](#shadow-dom-and-cross-root-aria-issues)
24+
- [Accessibility tree expectations](#accessibility-tree-expectations)
25+
- [Keyboard and focus](#keyboard-and-focus)
26+
- [Story and test examples](#story-and-test-examples)
27+
- [Known 1st-gen issues](#known-1st-gen-issues)
28+
- [Non-text contrast on loupe chrome (WCAG 1.4.11)](#non-text-contrast-on-loupe-chrome-wcag-1411)
29+
- [Testing](#testing)
30+
- [Automated tests](#automated-tests)
31+
- [Summary checklist](#summary-checklist)
32+
- [References](#references)
33+
34+
</details>
35+
36+
<!-- Document content (editable) -->
37+
38+
## Overview
39+
40+
This doc explains how **`swc-color-loupe`** should work for **accessibility**. It supports **WCAG 2.2 Level AA** as the team target, while recording **known** limitations for **non-text contrast** on the loupe chrome. Until **`swc-color-loupe`** ships, use **`1st-gen/packages/color-loupe/src/ColorLoupe.ts`** (`<sp-color-loupe>`) as the behavioral reference.
41+
42+
### Also read
43+
44+
- [Color field migration roadmap](../color-field/rendering-and-styling-migration-analysis.md)—the loupe is almost always used **with** a color **field** or similar **picker** UI, not alone.
45+
46+
### What it is
47+
48+
- A **visual magnifier** that shows the **picked color** (including **transparency** over an **opacity checkerboard**) inside a **loupe** shape with **inner** / **outer** borders.
49+
- It is **not** the primary control for choosing a color; it **reflects** the current sample.
50+
51+
---
52+
53+
## ARIA and WCAG context
54+
55+
### Pattern in the APG
56+
57+
- The [APG](https://www.w3.org/WAI/ARIA/apg/) does **not** define a standalone “color loupe” widget. Treat the loupe as **supporting UI** for **color selection**, with **accessibility** carried by the **surrounding** pattern (**label**, **inputs**, **live** value text where appropriate).
58+
59+
### Guidelines that apply
60+
61+
| Idea | Plain meaning |
62+
|------|----------------|
63+
| [Non-text contrast (WCAG 1.4.11)](https://www.w3.org/WAI/WCAG22/Understanding/non-text-contrast) | **Borders** and other **non-text** parts needed to **perceive** the loupe shape against **adjacent** colors should meet **at least 3:1** contrast. The loupe sits over **variable** content; **1st-gen** styling often **does not** meet **3:1** for the loupe **chrome**—see **Known 1st-gen issues** and [SWC-1193](https://jira.corp.adobe.com/browse/SWC-1193). |
64+
| [Non-text content (WCAG 1.1.1)](https://www.w3.org/WAI/WCAG22/Understanding/non-text-content) | **1st-gen** marks the **SVG** **`aria-hidden="true"`**—the graphic is **decorative** relative to assistive tech **if** the **parent** pattern exposes the **color** and **purpose** in text or other accessible names. |
65+
| [Use of color (WCAG 1.4.1)](https://www.w3.org/TR/WCAG22/#use-of-color) | The **loupe** shows **color**; meaning must **not** rely on the loupe **alone**. The **field** / **slider** / **hex** input must **state** what is being adjusted. |
66+
67+
**Bottom line:** Pair **`swc-color-loupe`** with a **fully labeled** color **workflow**. Accept **documented** **1.4.11** limitations on loupe **chrome** per **SWC-1193** unless design finds a **conformant** approach that still meets product goals.
68+
69+
---
70+
71+
## Related 1st-gen accessibility (Jira)
72+
73+
| Jira | Type | Status (snapshot) | Resolution (snapshot) | Summary |
74+
|------|------|-------------------|-------------------------|---------|
75+
| [SWC-1193](https://jira.corp.adobe.com/browse/SWC-1193) | Bug | Done | Working As Designed | [Accessibility] Graphical object lacks 3:1 contrast ratio — `sp-color-loupe` (Color Loupe Example) |
76+
77+
---
78+
79+
## Recommendations: `<swc-color-loupe>`
80+
81+
### ARIA roles, states, and properties
82+
83+
| Topic | What to do |
84+
|-------|------------|
85+
| **Non-text contrast (1.4.11)** | Aim for **3:1** on **loupe** **borders** / **edges** vs **adjacent** UI where **feasible**. Where **variable color** constraints make **3:1** **unrealistic** for all states, record the **[SWC-1193](https://jira.corp.adobe.com/browse/SWC-1193)** **decision** and keep **audit** language aligned with SWC-1196's **[comment](https://jira.corp.adobe.com/browse/SWC-1193?focusedId=51301299&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-51301299)** on practical limits. |
86+
| **Docs** | State that the loupe is a **visual aid**, not a **standalone** **accessible** color **control**. Point authors to **color field** / **picker** docs for **labels**, **keyboard**, and **values**. |
87+
88+
### Shadow DOM and cross-root ARIA Issues
89+
90+
None
91+
92+
### Accessibility tree expectations
93+
94+
- With **1st-gen** **`aria-hidden`** **SVG**, assistive technologies typically **ignore** the **vector** graphic; users rely on **paired** **controls** and **text** for **color** and **context**.
95+
- If **`open`** is **false**, the loupe is **hidden** visually; behavior should stay **consistent** with **CSS** / **display** and **not** trap **focus** in a **closed** loupe.
96+
97+
### Keyboard and focus
98+
99+
**Not focusable.** Keyboard navigation should skip this component and move to the next focusable element.
100+
101+
### Story and test examples
102+
103+
- **Stories** and **automated tests** should show **`swc-color-loupe`** / **`<sp-color-loupe>`** **in context** with **other** components (for example a **color field**, **sliders**, **labels**, **help text**), **not** as a **lone** widget on an empty canvas—unless the story’s **only** goal is a **narrow** **visual** check.
104+
- Examples must be **fully accessible**: **correct** **`label`** / **`aria-labelledby`** / **`aria-label`** where needed, **descriptive** strings (no **placeholder-only** meaning), and **layouts** that resemble **real** product **usage** so **docs**, **VRT**, and **a11y** tests **exercise** realistic **trees**.
105+
106+
---
107+
108+
## Known 1st-gen issues
109+
110+
### Non-text contrast on loupe chrome (WCAG 1.4.11)
111+
112+
- **1st-gen** **`<sp-color-loupe>`** **border** / **loupe** **outline** styling often **does not** achieve the **minimum 3:1** **contrast ratio** against **adjacent** colors required by [**WCAG 2.2 Success Criterion 1.4.11** (Non-text contrast, Level AA)](https://www.w3.org/WAI/WCAG22/Understanding/non-text-contrast).
113+
- **[SWC-1193](https://jira.corp.adobe.com/browse/SWC-1193)** (Adobe **internal** Jira): **Najika** notes that meeting **1.4.11** for this control **realistically** may **not** be **achievable** given how the loupe **overlays** **arbitrary** **content** and **Spectrum** **visual** **intent**. Treat that ticket as the **product** / **a11y** **decision** record for **exceptions** or **risk** **acceptance** until **design** **changes** or **new** **techniques** land.
114+
115+
---
116+
117+
## Testing
118+
119+
### Automated tests
120+
121+
| Kind of test | What to check |
122+
|--------------|----------------|
123+
| **Unit** | **`open`** / **`color`** do **not** break **parent** **label** associations; **SVG** **`aria-hidden`** matches implementation. |
124+
| **aXe + Storybook** | Run on **composite** stories (loupe **+** **field** / **sliders**), **not** only **isolated** loupe frames. |
125+
| **Contrast** | Where **policy** requires, measure **loupe** **chrome** at **representative** backgrounds; **document** **gaps** **per** **SWC-1193** when **3:1** is **not** met. |
126+
| **Integration** | **E2E** / **snapshots** use **realistic** **pages**: **labels**, **focus order**, and **values** on **surrounding** **controls**. |
127+
128+
---
129+
130+
## Summary checklist
131+
132+
- [ ] **Stories** place the loupe **in** **real** **picker** **contexts** with **accessible** **siblings**, not **only** the loupe **on** **gray** **canvas**.
133+
- [ ] **Copy** is **descriptive**; **no** **token-only** **labels** as the **sole** **accessible** **name** for **user-facing** **steps**.
134+
- [ ] **Color field** (or **equivalent**) **owns** **name**, **value**, and **keyboard**; loupe does **not** **stand** **in** for **that**.
135+
- [ ] **SWC-1193** **position** on **1.4.11** is **reflected** in **internal** **audit** / **release** **notes** where **needed**.
136+
- [ ] **Contrast** **measurements** for **loupe** **chrome** are **attempted** on **key** **themes**; **failures** are **known** **issues**, **not** **silent**.
137+
138+
---
139+
140+
## References
141+
142+
- [WCAG 2.2 Success Criterion 1.4.11: Non-text contrast (understanding)](https://www.w3.org/WAI/WCAG22/Understanding/non-text-contrast)
143+
- [WCAG 2.2](https://www.w3.org/TR/WCAG22/)
144+
- [Using ARIA (read this first)](https://www.w3.org/WAI/ARIA/apg/practices/read-me-first/)
145+
- [SWC-1193](https://jira.corp.adobe.com/browse/SWC-1193) (Adobe internal Jira—non-text contrast / realistic constraints for color loupe)
146+
- [Color field migration roadmap](../color-field/rendering-and-styling-migration-analysis.md)

CONTRIBUTOR-DOCS/03_project-planning/03_components/divider/accessibility-migration-analysis.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
- [ARIA and WCAG context](#aria-and-wcag-context)
1919
- [Pattern in the APG](#pattern-in-the-apg)
2020
- [Guidelines that apply](#guidelines-that-apply)
21+
- [Related 1st-gen accessibility (Jira)](#related-1st-gen-accessibility-jira)
2122
- [Recommendations: `<swc-divider>`](#recommendations-swc-divider)
2223
- [ARIA roles, states, and properties](#aria-roles-states-and-properties)
2324
- [Shadow DOM and cross-root ARIA Issues](#shadow-dom-and-cross-root-aria-issues)
@@ -69,6 +70,13 @@ This doc explains how **`swc-divider`** should work for **accessibility**. It su
6970

7071
---
7172

73+
## Related 1st-gen accessibility (Jira)
74+
75+
| Jira | Type | Status (snapshot) | Resolution (snapshot) | Summary |
76+
|------|------|-------------------|-------------------------|---------|
77+
78+
---
79+
7280
## Recommendations: `<swc-divider>`
7381

7482
### ARIA roles, states, and properties

0 commit comments

Comments
 (0)