[5.0.0-alpha3] Menu items do not get is-active class

Created on 25 May 2025, 13 days ago

Problem/Motivation

The main menu gets rendered as a "ui_suite_daisyui:menu" component, through menu--main.html.twig.
However, do to the logic in there, the menu item elements do not automatically get the "is-active" class assigned to them, which does happen in Drupal core themes (probably through the "drupal.active-link" library).

It would make sense to have the active menu item be visually styled the same as when a menu item is hovered...

Steps to reproduce

- Add main menu block to a DaisyUI-powered theme
- Navigate to a page within the main menu
- Inspect the active menu item - it has no specific class to indicate it is the active item, nor any different visual style applied to it.

Proposed resolution

- Make sure the Drupal core "is-active" class gets correctly added to the active menu item
- Preferably, apply a different visual style to menu link items that have class "is-active".

πŸ› Bug report
Status

Active

Version

5.0

Component

Code

Created by

πŸ‡§πŸ‡ͺBelgium svendecabooter Gent

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024