NPM Resource Changed PR-6.0-dev Pending

User tests: Successful: Unsuccessful:

avatar LadySolveig
LadySolveig
10 Nov 2025

Pull Request for Issue #46364 .
Replacement for #46397 (same code that is tested, but moved to previous branch)

Summary of Changes

Introduce a new class (nav-active-open) for the default menu, allowing control over whether submenus are opened automatically on page load for the active menu item.

grafik grafik

Caution

This functionality should not be activated by default without an additional class for all default menus, as it may not be desirable in various other module positions.
Example - Cassiopeia menu position
grafik

Additionally updated the toggleSubMenu method to use optional chaining when setting the aria-expanded attribute, preventing errors if the target element is missing.

Testing Instructions

  • Install Blog-Sample-Data
  • Move the Main Menu Blog module to position sidebar-right
  • Switch the layout to Default

Step 1

  • Open site in frontend and select submenu entry Help -> Workflows

Step 2

  • Edit Main Menu Blog module - add class nav-active-open
  • Open site in frontend and select submenu entry Help -> Workflows

Important

For this to test an update of the media asset is required, please use the prebuilt packages or run npm install.

menu-fix.mp4

Actual result BEFORE applying this Pull Request

Should always be collapsed - with and without the class.

Expected result AFTER applying this Pull Request

Step 1
Submenu with menu entry Workflows should be always collapsed (without the class).
Step 2
Submenu with menu entry Workflows should stay open on new page load if Workflow is the current active item (with class set).

Link to documentations

Please select:

  • Documentation link for docs.joomla.org:

  • No documentation changes for docs.joomla.org needed

  • Pull Request link for manual.joomla.org:

  • No documentation changes for manual.joomla.org needed

avatar LadySolveig LadySolveig - open - 10 Nov 2025
avatar LadySolveig LadySolveig - change - 10 Nov 2025
Status New ⇒ Pending
avatar joomla-cms-bot joomla-cms-bot - change - 10 Nov 2025
Category ⇒ JavaScript Repository NPM Change
avatar Bodge-IT Bodge-IT - alter_testresult - 10 Nov 2025 - @bemblimen: Tested successfully
avatar Bodge-IT Bodge-IT - alter_testresult - 10 Nov 2025 - ceford: Tested successfully
avatar Bodge-IT Bodge-IT - change - 10 Nov 2025
Labels Added: NPM Resource Changed PR-6.0-dev
avatar Bodge-IT Bodge-IT - alter_testresult - 10 Nov 2025 - exlemor: Tested successfully
avatar Bodge-IT Bodge-IT - alter_testresult - 10 Nov 2025 - ceford: Tested successfully
avatar Bodge-IT Bodge-IT - alter_testresult - 10 Nov 2025 - ceford: Tested successfully
avatar softforge softforge - change - 10 Nov 2025
Labels Added: RTC
avatar softforge softforge - change - 10 Nov 2025
Status Pending ⇒ Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 ⇒ 2025-11-10 23:18:48
Closed_By ⇒ softforge
Labels Removed: RTC
avatar softforge softforge - close - 10 Nov 2025
avatar softforge softforge - merge - 10 Nov 2025
avatar softforge
softforge - comment - 10 Nov 2025

Thank you @LadySolveig and the testers from the previous PR

avatar Oekosoft
Oekosoft - comment - 10 Dec 2025

This works for the active sub menu. We should have a fix to achieve all submenus open (as it behaved before Joomla 6). E.g. look at https://www.dgcsh.ch/dgcsh/sitemap.html . The first sub menu on top level (and it's childs) are open, the further sub menus on top level are closed.

avatar angieradtke
angieradtke - comment - 10 Nov 2026

Unfortunately, I only noticed this fundamental change now, as I mainly work with my own template overrides and therefore don't regularly use the default behaviour of mod_menu.

The new solution makes technical sense. However, making it the default and replacing the previous behaviour was, in my opinion, a poor architectural decision.

The traditional menu with permanently visible, nested lists is well-established, intuitive and follows common web standards. It has one particularly important advantage for vertical navigation: the navigation hierarchy remains visible even on subpages. Users can immediately see where they are within the website and which content belongs to the current section.

This type of navigation is mainly used on larger websites, which is probably why the problem doesn't become apparent immediately. We actually had discussions about this in the JWC recently, in the context of the documentation.

The new approach also introduces a UX issue: the menu item and the toggle button serve different purposes. One navigates to a page, while the other expands or collapses the submenu. In many modern navigation designs, clearly distinguishing these two elements visually is difficult. Underlining links in a navigation menu is hardly a desirable solution either.

The new behaviour makes sense for horizontal dropdown navigation. For vertical navigation, however, I consider it only partially suitable.

The old approach may not have been particularly sexy or modern, but it was robust, stable, intuitive and accessible. I find it a real shame that this proven option has now been removed. In my view, the new solution should have been introduced as an additional option, rather than replacing the existing default behaviour.

Add a Comment

Login with GitHub to post a comment