Commit 11f3186
Backport fixes for WCAG 1.3.1 and WCAG 4.1.2 (#1566)
* fix(a11y): fix invalid list structures in navigation and alert group (WCAG 1.3.1) (#1564)
WCAG 2.2 criterion 1.3.1 (Info and Relationships, Level A) requires that
programmatic structure matches the visual presentation so assistive
technologies can correctly expose list context and item counts.
Two violations fixed:
1. Navigation sidebar (RecentList): NavGroup (renders <section>) was a direct
child of NavList (renders <ul>), producing <ul><section>...</section></ul>.
HTML forbids <section> as a direct child of <ul>; screen readers could not
announce the correct list context or item count.
Fix: remove the NavList wrapper from NavigationRecentList. NavGroup already
creates its own internal <ul> for its NavItem children, so the rendered
structure is now <nav><ul>...</ul><section><ul><li>...</li></ul></section></nav>,
which is valid and correctly exposes the list to assistive technologies.
2. Toast alert group (AppAlertGroup): AlertGroup with isToast always rendered
<ul role="list" class="pf-v6-c-alert-group pf-m-toast"> even when empty.
An empty element declared as a list violates 1.3.1 because it claims a list
relationship with no list items.
Fix: return an empty fragment when there are no alerts, consistent with the
existing guard in WorkspaceProgress/Alert.
Assisted-by: Claude Sonnet 4.6
Signed-off-by: Oleksii Orel <oorel@redhat.com>
* fix(a11y): add role="img" to workspace status indicator span (WCAG 4.1.2) (#1563)
WCAG 2.2 criterion 4.1.2 (Name, Role, Value, Level A) requires that elements
with aria-label have a valid semantic role so assistive technologies can
correctly expose the value.
The workspace status indicator used a generic <span> with aria-label but no
role, causing screen readers to silently ignore the status text. The same span
is used in the Workspaces list and the Workspace Details Overview.
Adding role="img" to the span declares it as a named graphic element.
Screen readers now announce e.g. "Workspace status is Running" when the
element receives focus, satisfying the criterion.
Assisted-by: Claude Sonnet 4.6
Signed-off-by: Oleksii Orel <oorel@redhat.com>
---------
Signed-off-by: Oleksii Orel <oorel@redhat.com>
Co-authored-by: Oleksii Orel <oorel@redhat.com>1 parent f478571 commit 11f3186
4 files changed
Lines changed: 26 additions & 7 deletions
File tree
- packages/dashboard-frontend/src
- components
- AppAlertGroup
- Workspace/Status/Indicator
- __tests__/__snapshots__
Lines changed: 4 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
59 | 57 | | |
60 | 58 | | |
61 | 59 | | |
| |||
Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
95 | | - | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
96 | 100 | | |
97 | 101 | | |
98 | 102 | | |
| |||
Lines changed: 16 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
| |||
70 | 71 | | |
71 | 72 | | |
72 | 73 | | |
| 74 | + | |
73 | 75 | | |
74 | 76 | | |
75 | 77 | | |
| |||
119 | 121 | | |
120 | 122 | | |
121 | 123 | | |
| 124 | + | |
122 | 125 | | |
123 | 126 | | |
124 | 127 | | |
| |||
169 | 172 | | |
170 | 173 | | |
171 | 174 | | |
| 175 | + | |
172 | 176 | | |
173 | 177 | | |
174 | 178 | | |
| |||
229 | 233 | | |
230 | 234 | | |
231 | 235 | | |
| 236 | + | |
232 | 237 | | |
233 | 238 | | |
234 | 239 | | |
| |||
279 | 284 | | |
280 | 285 | | |
281 | 286 | | |
| 287 | + | |
282 | 288 | | |
283 | 289 | | |
284 | 290 | | |
| |||
328 | 334 | | |
329 | 335 | | |
330 | 336 | | |
| 337 | + | |
331 | 338 | | |
332 | 339 | | |
333 | 340 | | |
| |||
377 | 384 | | |
378 | 385 | | |
379 | 386 | | |
| 387 | + | |
380 | 388 | | |
381 | 389 | | |
382 | 390 | | |
| |||
427 | 435 | | |
428 | 436 | | |
429 | 437 | | |
| 438 | + | |
430 | 439 | | |
431 | 440 | | |
432 | 441 | | |
| |||
476 | 485 | | |
477 | 486 | | |
478 | 487 | | |
| 488 | + | |
479 | 489 | | |
480 | 490 | | |
481 | 491 | | |
| |||
536 | 546 | | |
537 | 547 | | |
538 | 548 | | |
| 549 | + | |
539 | 550 | | |
540 | 551 | | |
541 | 552 | | |
| |||
585 | 596 | | |
586 | 597 | | |
587 | 598 | | |
| 599 | + | |
588 | 600 | | |
589 | 601 | | |
590 | 602 | | |
| |||
645 | 657 | | |
646 | 658 | | |
647 | 659 | | |
| 660 | + | |
648 | 661 | | |
649 | 662 | | |
650 | 663 | | |
| |||
705 | 718 | | |
706 | 719 | | |
707 | 720 | | |
| 721 | + | |
708 | 722 | | |
709 | 723 | | |
710 | 724 | | |
| |||
782 | 796 | | |
783 | 797 | | |
784 | 798 | | |
| 799 | + | |
785 | 800 | | |
786 | 801 | | |
787 | 802 | | |
| |||
831 | 846 | | |
832 | 847 | | |
833 | 848 | | |
| 849 | + | |
834 | 850 | | |
835 | 851 | | |
836 | 852 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| 57 | + | |
57 | 58 | | |
58 | 59 | | |
59 | 60 | | |
| |||
0 commit comments