fix(global-header): scope accessibility test to #global-header element#3949
Conversation
Fixes: https://redhat.atlassian.net/browse/RHDHBUGS-2247 Signed-off-by: rohitratannagar <rohitratannagar2003@gmail.com>
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3949 +/- ##
==========================================
- Coverage 57.35% 57.35% -0.01%
==========================================
Files 2384 2384
Lines 95608 95605 -3
Branches 26699 26711 +12
==========================================
- Hits 54832 54830 -2
+ Misses 39238 39236 -2
- Partials 1538 1539 +1
*This pull request uses carry forward flags. Click here to find out more. Continue to review full report in Codecov by Harness.
🚀 New features to boost your workflow:
|
PR Summary by QodoScope global-header axe scan to #global-header instead of disabling nested-interactive
AI Description
Diagram
High-Level Assessment
Files changed (2)
|
Code Review by Qodo
Context used✅ Compliance rules (platform):
11 rules✅ Cross-repo context Not relevant to this PR:
redhat-developer/rhdh Not relevant to this PR:
redhat-developer/rhdh-chart Not relevant to this PR:
redhat-developer/rhdh-operator Not relevant to this PR:
redhat-developer/rhdh-local 1. Scoped a11y misses dropdowns
|



Description
Raised using bug-fix skill
Replaced the blanket
disableRules(['nested-interactive'])workaround in the global-header accessibility test with a targetedAxeBuilder.include('#global-header')scope. The 211nested-interactiveviolations originate from the upstream Backstage catalog table (react-beautiful-dnd addsrole="button"to draggable column headers, which nest inside MUITableSortLabelbuttons), not from the global header itself. By scoping the axe analysis to only the#global-headerelement, the test now validates the header's own accessibility without suppressing any axe rules.Root cause
The
nested-interactiveaxe-core violations came from the Backstage catalog table rendered below the global header —react-beautiful-dndaddsrole="button"to draggable<th>elements, which already contain MUI<TableSortLabel>buttons. The previous fix disabled thenested-interactiverule entirely, masking any real violations in the global header. The<AppBar id="global-header">component itself has a clean interactive structure with no nested controls.Fixed
UI before changes
screenrecordings_global-header-RHDHBUGS-2247_before-fix.1.webm
UI after changes
screenrecordings_global-header-RHDHBUGS-2247_after-fix.1.webm
Checklist
Note