Conversation
…1.2) 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>
|
Docker image build succeeded: quay.io/eclipse/che-dashboard:pr-1563 (linux/amd64, linux/arm64) kubectl patch commandkubectl patch -n eclipse-che "checluster/eclipse-che" --type=json -p="[{"op": "replace", "path": "/spec/components/dashboard/deployment", "value": {containers: [{image: "quay.io/eclipse/che-dashboard:pr-1563", name: che-dashboard}]}}]" |
|
/retest |
|
/retest |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1563 +/- ##
==========================================
- Coverage 92.50% 92.50% -0.01%
==========================================
Files 561 561
Lines 55890 55891 +1
Branches 4219 4218 -1
==========================================
Hits 51700 51700
- Misses 4142 4143 +1
Partials 48 48 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
dmytro-ndp
left a comment
There was a problem hiding this comment.
@olexii4 : I tested Eclipse Che Next with the User Dashboard image quay.io/eclipse/che-dashboard:pr-1563, and the correct HTML attribute role="img" was added as expected:
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: akurinnoy, dmytro-ndp, olexii4, svor The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
* 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>
What does this PR do?
Fixes WCAG 2.2 criterion 4.1.2 Name, Role, Value (Level A) for the workspace status indicator icon.
The
WorkspaceStatusIndicatorcomponent renders a<span>with anaria-label(e.g."Workspace status is Running") but no semantic role. Per the ARIA specification, naming attributes such asaria-labelare only honoured by assistive technologies when the element has a valid role. On a generic<span>, screen readers silently ignore the label — users who rely on a screen reader receive no information about the workspace status.This PR adds
role="img"to the span, declaring it as a named graphic element. Thearia-labelis now correctly exposed to the accessibility API and announced by screen readers when the element receives focus.Affected surfaces: Workspaces list table (status column) and Workspace Details Overview tab.
<span + role="img" className={styles.statusIndicator} data-testid="workspace-status-indicator" aria-label={`Workspace status is ${status}`} > {icon} </span>The
role="img"value is the correct choice here: the element contains a purely visual icon that conveys information, and thearia-labelsupplies its accessible text alternative — exactly the pattern described in ARIA authoring practices for images.Screenshot/screencast of this PR
What issues does this PR fix or reference?
fixes https://redhat.atlassian.net/browse/CRW-10233
Is it tested? How?
Indicator.spec.tsx.snapto includerole="img".Release Notes
Docs PR