From 7e158d3558c7a9530755d1be8a078723d8cc591f Mon Sep 17 00:00:00 2001 From: fullsend-code <278716306+fullsend-ai-coder[bot]@users.noreply.github.com> Date: Thu, 25 Jun 2026 14:44:17 +0000 Subject: [PATCH 1/2] fix(#3577): remove a11y violation filter and fix accessibility issues Remove the accessibility violation filter from e2e-tests/utils/accessibility.ts that was suppressing four axe-core violations (RHDHBUGS-2216). Fix the underlying issues in the adoption-insights plugin components: - aria-input-field-name: add aria-label to the date range Select in Header - button-name: add aria-label to the info IconButton in Users/Info - svg-img-alt: add role="img" and aria-label to PieChart and AreaChart - color-contrast: set opaque dark background (#151515) on MUI Tooltips in CatalogEntities, Templates, and Techdocs components Closes #3577 --- .../e2e-tests/utils/accessibility.ts | 16 ++++------------ .../src/components/ActiveUsers/ActiveUsers.tsx | 2 ++ .../CatalogEntities/CatalogEntities.tsx | 9 ++++++++- .../src/components/Header/Header.tsx | 1 + .../src/components/Techdocs/Techdocs.tsx | 9 ++++++++- .../src/components/Templates/Templates.tsx | 9 ++++++++- .../src/components/Users/Info.tsx | 2 +- .../src/components/Users/Users.tsx | 10 +++++++++- 8 files changed, 41 insertions(+), 17 deletions(-) diff --git a/workspaces/adoption-insights/e2e-tests/utils/accessibility.ts b/workspaces/adoption-insights/e2e-tests/utils/accessibility.ts index d3fbdac317..c01a2a6d31 100644 --- a/workspaces/adoption-insights/e2e-tests/utils/accessibility.ts +++ b/workspaces/adoption-insights/e2e-tests/utils/accessibility.ts @@ -26,21 +26,13 @@ export async function runAccessibilityTests( .withTags(['wcag2a', 'wcag2aa', 'wcag21a', 'wcag21aa']) .analyze(); - // Known violations filtered until fixed in UI; track in https://issues.redhat.com/browse/RHDHBUGS-2216 - const filteredViolations = accessibilityScanResults.violations.filter( - v => - ![ - 'aria-input-field-name', - 'button-name', - 'color-contrast', // MUI Tooltip default styling - 'svg-img-alt', // Recharts pie segments - ].includes(v.id), - ); - await testInfo.attach(attachName, { body: JSON.stringify(accessibilityScanResults, null, 2), contentType: 'application/json', }); - expect(filteredViolations, 'Accessibility violations found').toEqual([]); + expect( + accessibilityScanResults.violations, + 'Accessibility violations found', + ).toEqual([]); } diff --git a/workspaces/adoption-insights/plugins/adoption-insights/src/components/ActiveUsers/ActiveUsers.tsx b/workspaces/adoption-insights/plugins/adoption-insights/src/components/ActiveUsers/ActiveUsers.tsx index e66a920e9e..e3243a9947 100644 --- a/workspaces/adoption-insights/plugins/adoption-insights/src/components/ActiveUsers/ActiveUsers.tsx +++ b/workspaces/adoption-insights/plugins/adoption-insights/src/components/ActiveUsers/ActiveUsers.tsx @@ -112,6 +112,8 @@ const ActiveUsers = () => { data={data} margin={{ top: 10, right: 50, left: 20, bottom: 0 }} key={JSON.stringify(data.map(d => d))} + role="img" + aria-label={t('activeUsers.title')} > diff --git a/workspaces/adoption-insights/plugins/adoption-insights/src/components/CatalogEntities/CatalogEntities.tsx b/workspaces/adoption-insights/plugins/adoption-insights/src/components/CatalogEntities/CatalogEntities.tsx index 1470f99667..3eaf7caf79 100644 --- a/workspaces/adoption-insights/plugins/adoption-insights/src/components/CatalogEntities/CatalogEntities.tsx +++ b/workspaces/adoption-insights/plugins/adoption-insights/src/components/CatalogEntities/CatalogEntities.tsx @@ -215,7 +215,14 @@ const CatalogEntities = () => { }} > - + = () => { value={selectedOption} onChange={handleChange} renderValue={(selected: string) => getLabel(selected)} + aria-label={t('header.dateRange.defaultLabel')} sx={{ minWidth: 190, marginRight: '10px', diff --git a/workspaces/adoption-insights/plugins/adoption-insights/src/components/Techdocs/Techdocs.tsx b/workspaces/adoption-insights/plugins/adoption-insights/src/components/Techdocs/Techdocs.tsx index 21dc148be4..cb3cc2b23b 100644 --- a/workspaces/adoption-insights/plugins/adoption-insights/src/components/Techdocs/Techdocs.tsx +++ b/workspaces/adoption-insights/plugins/adoption-insights/src/components/Techdocs/Techdocs.tsx @@ -191,7 +191,14 @@ const Techdocs = () => { {techdoc?.name ? ( - + { minWidth: 0, }} > - + { }, }} > - + diff --git a/workspaces/adoption-insights/plugins/adoption-insights/src/components/Users/Users.tsx b/workspaces/adoption-insights/plugins/adoption-insights/src/components/Users/Users.tsx index 167666c93c..d8d7d649e8 100644 --- a/workspaces/adoption-insights/plugins/adoption-insights/src/components/Users/Users.tsx +++ b/workspaces/adoption-insights/plugins/adoption-insights/src/components/Users/Users.tsx @@ -112,7 +112,15 @@ const Users = () => { - + Date: Thu, 25 Jun 2026 18:52:02 +0000 Subject: [PATCH 2/2] fix: move aria-label to inputProps on Select for a11y compliance The aria-label on MUI Select was placed on the OutlinedInput root div which has no valid ARIA role. Moving it to inputProps ensures the label reaches the internal combobox element, fixing the aria-input-field-name axe violation. Addresses review feedback on #3582 --- .../plugins/adoption-insights/src/components/Header/Header.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/workspaces/adoption-insights/plugins/adoption-insights/src/components/Header/Header.tsx b/workspaces/adoption-insights/plugins/adoption-insights/src/components/Header/Header.tsx index 15334f4e1f..8e8d6c7b39 100644 --- a/workspaces/adoption-insights/plugins/adoption-insights/src/components/Header/Header.tsx +++ b/workspaces/adoption-insights/plugins/adoption-insights/src/components/Header/Header.tsx @@ -139,7 +139,7 @@ const InsightsHeader: FC = () => { value={selectedOption} onChange={handleChange} renderValue={(selected: string) => getLabel(selected)} - aria-label={t('header.dateRange.defaultLabel')} + inputProps={{ 'aria-label': t('header.dateRange.defaultLabel') }} sx={{ minWidth: 190, marginRight: '10px',