Skip to content

fix(global-header): restore keyboard navigation for menu items without links#3848

Open
its-mitesh-kumar wants to merge 1 commit into
redhat-developer:mainfrom
its-mitesh-kumar:fix/RHDHBUGS-1931-help-menu-keyboard-a11y
Open

fix(global-header): restore keyboard navigation for menu items without links#3848
its-mitesh-kumar wants to merge 1 commit into
redhat-developer:mainfrom
its-mitesh-kumar:fix/RHDHBUGS-1931-help-menu-keyboard-a11y

Conversation

@its-mitesh-kumar

Copy link
Copy Markdown
Member

Description

MenuSection used component={Fragment} on MUI MenuItem when items had no link prop. React's Fragment silently drops all props, so MUI's role="menuitem" and tabIndex attributes were never rendered to the DOM. This made those items invisible to MUI MenuList arrow-key traversal. The Help dropdown's SupportButton (which manages navigation internally and has no link in its mount point config) was the primary victim.

The fix conditionally spreads component/to only when a link exists, letting MenuItem render its default <li> with proper ARIA attributes. Non-clickable section headers now render <ListSubheader> directly instead of wrapping in a no-op <MenuItem component={Fragment}>.

Fixed

  • RHDHBUGS-1931 — [global-header] Menu items in Help menu can't be accessed with a keyboard

Checklist

  • A changeset describing the change and affected packages. (more info)
  • Added or Updated documentation
  • Tests for new functionality and regression tests for bug fixes
  • Screenshots attached (for UI changes)

Note

This bug fix was identified and implemented using the bug-fix and raise-pr agent skills. Please verify the fix thoroughly before merging.

…t links

Fixes: https://redhat.atlassian.net/browse/RHDHBUGS-1931
Signed-off-by: its-mitesh-kumar <itsmiteshkumar98@gmail.com>
@rhdh-gh-app

rhdh-gh-app Bot commented Jul 19, 2026

Copy link
Copy Markdown

Changed Packages

Package Name Package Path Changeset Bump Current Version
@red-hat-developer-hub/backstage-plugin-global-header workspaces/global-header/plugins/global-header patch v1.21.7

@sonarqubecloud

Copy link
Copy Markdown

@codecov

codecov Bot commented Jul 19, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 40.00000% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 56.26%. Comparing base (8d3503a) to head (b91b377).
⚠️ Report is 36 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3848      +/-   ##
==========================================
- Coverage   56.26%   56.26%   -0.01%     
==========================================
  Files        2499     2499              
  Lines       96058    96059       +1     
  Branches    26644    26647       +3     
==========================================
- Hits        54047    54046       -1     
- Misses      41683    41684       +1     
- Partials      328      329       +1     
Flag Coverage Δ *Carryforward flag
adoption-insights 83.70% <ø> (ø) Carriedforward from 8d3503a
ai-integrations 69.00% <ø> (ø) Carriedforward from 8d3503a
app-defaults 69.79% <ø> (ø) Carriedforward from 8d3503a
augment 46.39% <ø> (ø) Carriedforward from 8d3503a
boost 73.13% <ø> (ø) Carriedforward from 8d3503a
bulk-import 72.46% <ø> (ø) Carriedforward from 8d3503a
cost-management 14.10% <ø> (ø) Carriedforward from 8d3503a
dcm 61.81% <ø> (ø) Carriedforward from 8d3503a
extensions 61.53% <ø> (ø) Carriedforward from 8d3503a
global-floating-action-button 71.18% <ø> (ø) Carriedforward from 8d3503a
global-header 59.57% <40.00%> (-0.14%) ⬇️
homepage 50.23% <ø> (ø) Carriedforward from 8d3503a
install-dynamic-plugins 56.77% <ø> (ø) Carriedforward from 8d3503a
intelligent-assistant 69.01% <ø> (ø) Carriedforward from 8d3503a
konflux 91.49% <ø> (ø) Carriedforward from 8d3503a
lightspeed 69.02% <ø> (ø) Carriedforward from 8d3503a
mcp-integrations 85.46% <ø> (ø) Carriedforward from 8d3503a
orchestrator 53.74% <ø> (ø) Carriedforward from 8d3503a
quickstart 65.63% <ø> (ø) Carriedforward from 8d3503a
sandbox 79.56% <ø> (ø) Carriedforward from 8d3503a
scorecard 82.96% <ø> (ø) Carriedforward from 8d3503a
theme 61.26% <ø> (ø) Carriedforward from 8d3503a
translations 7.25% <ø> (ø) Carriedforward from 8d3503a
x2a 78.68% <ø> (ø) Carriedforward from 8d3503a

*This pull request uses carry forward flags. Click here to find out more.


Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8d3503a...b91b377. Read the comment docs.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@its-mitesh-kumar

Copy link
Copy Markdown
Member Author

/hold
Lets wait for accessibility fix of global-header by @rohitratannagar then we will revisit and check ifwe still need this PR.
Cc: @sanketpathak @teknaS47

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant