Skip to content

[aries-core] NavMenu - Added ability to support grouping child NavItems with subheadings#5700

Merged
halocline merged 32 commits intomasterfrom
navmenu-subheadings
Feb 17, 2026
Merged

[aries-core] NavMenu - Added ability to support grouping child NavItems with subheadings#5700
halocline merged 32 commits intomasterfrom
navmenu-subheadings

Conversation

@halocline
Copy link
Collaborator

@halocline halocline commented Jan 16, 2026

Deploy Preview

What does this PR do?

This pull request introduces support for grouped navigation items in the NavigationMenu component, enhancing both its structure and accessibility. It adds new components for rendering group headers and containers, updates the navigation item data model, and includes comprehensive documentation and tests for the new grouping feature.

Grouped Navigation Support:

  • Added a new type?: 'group' | 'item' property to NavItemType to distinguish between standard items and group containers, enabling hierarchical grouping in navigation menus. [1] [2]
  • Implemented the NavGroup and GroupHeading components to render group containers and accessible group headers, including proper ARIA roles and levels for improved accessibility. [1] [2] [3]
  • Updated NavList to recognize and render grouped navigation structures, ensuring correct indentation, focus management, and parent/child relationships. [1] [2] [3] [4] [5] [6] [7] [8]

Documentation and Accessibility:

  • Expanded the documentation with examples and ARIA guidance for grouped navigation menus, including sample usage and accessibility best practices. [1] [2]
  • Improved accessibility by adding ARIA roles (group, heading, aria-labelledby) to group containers and headers. [1] [2] [3]

Testing and Storybook Integration:

  • Added comprehensive tests for grouped navigation, verifying correct rendering, accessibility, and user interaction with group headers and children.
  • Introduced a NavigationPanel story to demonstrate grouped navigation in different layouts, including mobile responsiveness. [1] [2]

Other Improvements:

  • Enhanced ItemLabel to support dynamic color changes based on item state (hover, focus, active). [1] [2] [3]
  • Minor import and refactoring updates to support the new features and maintain code consistency. [1] [2]

These changes collectively make the navigation menu more flexible, accessible, and easier to use in complex UI scenarios.

What are the relevant issues?

Where should the reviewer start?

How should this be manually tested?

Any background context you want to provide?

Screenshots (if appropriate)

Should this PR be mentioned in Design System updates?

Is this change backwards compatible or is it a breaking change?

@changeset-bot
Copy link

changeset-bot bot commented Jan 16, 2026

⚠️ No Changeset found

Latest commit: 0211453

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@netlify
Copy link

netlify bot commented Jan 16, 2026

Deploy Preview for hpe-theme-preview ready!

Name Link
🔨 Latest commit 0211453
🔍 Latest deploy log https://app.netlify.com/projects/hpe-theme-preview/deploys/6994fb04c66a5d000811876d
😎 Deploy Preview https://deploy-preview-5700--hpe-theme-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify
Copy link

netlify bot commented Jan 16, 2026

Deploy Preview for unrivaled-bublanina-3a9bae ready!

Name Link
🔨 Latest commit 0211453
🔍 Latest deploy log https://app.netlify.com/projects/unrivaled-bublanina-3a9bae/deploys/6994fb04741eda000845fa1f
😎 Deploy Preview https://deploy-preview-5700--unrivaled-bublanina-3a9bae.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify
Copy link

netlify bot commented Jan 16, 2026

Deploy Preview for hpe-design-icons-grommet ready!

Name Link
🔨 Latest commit 0211453
🔍 Latest deploy log https://app.netlify.com/projects/hpe-design-icons-grommet/deploys/6994fb04196fcb00083b263a
😎 Deploy Preview https://deploy-preview-5700--hpe-design-icons-grommet.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request adds support for grouped navigation items in the NavigationMenu component, enabling hierarchical organization with non-interactive subheadings. The implementation introduces a new type property to distinguish between standard items and group containers, adds new NavGroup and GroupHeading components for rendering grouped structures, and includes comprehensive tests and documentation.

Changes:

  • Introduced type?: 'group' | 'item' property to NavItemType for distinguishing item types
  • Added NavGroup and GroupHeading components with proper ARIA roles and attributes for accessibility
  • Updated NavList to handle grouped navigation structures, including proper indentation and parent/child relationships
  • Enhanced ItemLabel to support dynamic color changes based on interaction state
  • Refactored navigation stories and extracted NavigationPanel component for better code organization

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
navigation.stories.tsx Refactored to extract NavigationPanel component and added new story for grouped navigation
nav-items.tsx Added navItemsSubheadings example data demonstrating grouped navigation structure
NavigationPanel.tsx New extracted component handling navigation panel logic for both mobile and desktop
NavList.tsx Updated to recognize and render grouped structures with proper focus and expansion logic
NavItem/NavItem.tsx Added type property to NavItemType and enhanced focus state handling
NavItem/ItemLabel.tsx Added dynamic color support and conditional icon rendering
NavGroup/NavGroup.tsx New component rendering group containers with accessibility attributes
NavGroup/GroupHeading.tsx New component rendering non-interactive group headers with heading role
NavigationMenu.test.tsx Added comprehensive tests for grouped navigation functionality
DOCUMENTATION.md Updated with grouped navigation examples and ARIA guidance

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 12 out of 12 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

…up/NavGroup.tsx

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@halocline halocline added the Owner:Development Used in issues that are being worked on/should be worked on by a developer. label Jan 16, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 13 out of 13 changed files in this pull request and generated 9 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Collaborator

@MikeKingdom MikeKingdom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool stuff

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 13 out of 13 changed files in this pull request and generated 4 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

...item,
children: item.children.map(child => ({
...child,
level: item.level || 0,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here you are falling back on 0 for the level. above on line 7 isn't the type definition

export type NavItemWithLevel = NavItemType & { level?: 1 | 2 };

or am I reading this incorrectly? I know there isnt a TS error just something that caught my eye

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good eye. Fixed NavItemWithLevel type definition.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice okay!

@halocline halocline requested a review from britt6612 February 17, 2026 21:21
Copy link
Collaborator

@britt6612 britt6612 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you merge master see if those tests pass

@halocline halocline merged commit 4f8c828 into master Feb 17, 2026
12 of 19 checks passed
@halocline halocline deleted the navmenu-subheadings branch February 17, 2026 23:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Owner:Development Used in issues that are being worked on/should be worked on by a developer.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants