Commit 8781a84
committed
fix(a11y): announce workspace condition sub-steps to screen readers
Follow-up to the workspace status live-region fix. Condition sub-steps
(StorageReady, RoutingReady, DeploymentReady, etc.) were not being announced
because ProgressStepTitle received mixed children [string, ReactElement] and
the previous typeof check only handled plain-string children.
Changes:
ProgressStepTitle:
- Add extractText() helper that recursively extracts plain text from any
ReactNode (string, array, or React element with nested children).
- Replace typeof children === 'string' check with extractText(children) so
the live region is populated regardless of whether children are plain strings
or mixed string + JSX nodes.
- Add optional parentStepName prop. When set, the live-region announcement
reads "Step: {parentStepName} / {stepText}" so screen readers hear the full
context for sub-steps (e.g. "Step: Waiting for workspace to start / StorageReady").
StartingStepWorkspaceConditions:
- Pass parentStepName="Waiting for workspace to start" to ProgressStepTitle so
each condition sub-step is announced with the parent step context.
Assisted-by: Claude Sonnet 4.6
Signed-off-by: Oleksii Orel <oorel@redhat.com>1 parent e80f923 commit 8781a84
2 files changed
Lines changed: 28 additions & 2 deletions
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
176 | 176 | | |
177 | 177 | | |
178 | 178 | | |
| 179 | + | |
179 | 180 | | |
180 | 181 | | |
181 | 182 | | |
| |||
Lines changed: 27 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
24 | 27 | | |
25 | 28 | | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
26 | 43 | | |
27 | 44 | | |
28 | | - | |
| 45 | + | |
| 46 | + | |
29 | 47 | | |
30 | 48 | | |
31 | 49 | | |
| |||
53 | 71 | | |
54 | 72 | | |
55 | 73 | | |
| 74 | + | |
| 75 | + | |
56 | 76 | | |
57 | 77 | | |
58 | 78 | | |
59 | | - | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
60 | 85 | | |
61 | 86 | | |
62 | 87 | | |
| |||
0 commit comments