Skip to content

[NavigationMenu] Vertical menu with children doesn't respect parent Link attributes. #3911

Open
@phillycheeze

Description

@phillycheeze

Environment

  • Operating System: Darwin
  • Node Version: v23.9.0
  • Nuxt Version: 3.16.2
  • CLI Version: 3.24.1
  • Nitro Version: 2.11.8
  • Package Manager: [email protected]
  • Builder: -
  • User Config: compatibilityDate, devtools, modules, components, css, devServer, ssr, vuefire, runtimeConfig
  • Runtime Modules: @nuxt/[email protected], @nuxt/[email protected], [email protected]
  • Build Modules: -

Is this bug related to Nuxt or Vue?

Nuxt

Version

v3.0.2

Reproduction

This is noticeable on the documentation page for any vertical navigation menu with children navigation items.

Description

The parent item renders as a <button> tag instead of the <a> tags of other navigation menu items. This means the to: attribute is ignored (and target) and can't be clicked on. This is likely due to the parent and children being converted to a Collapsible component under the hood.

When the orientation is horizontal, however, you can have both the parent and children be links - where they render <a> tags. Hovering over the horizontal parent shows the children, but the parent can still be a link.

Ideally, we could set a boolean to control whether the children are converted to a Collapsible or not. Or wrap the Collapsible parent around a link. Understandably, the click then couldn't trigger opening/closing the collapsible (maybe the icon triggers opening/closing, while the label can still have the Link attributes available).

Additional context

No response

Logs

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtriagev3#1289

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions