Skip to content

bug: Disabled menu items still work with keyboard #4251

@sulimanbenhalim

Description

@sulimanbenhalim

Reproduction URL (Required)

https://play.tailwindcss.com/YZF6oUUS3p

What version of daisyUI are you using?

v5.4.5

Which browsers are you seeing the problem on?

Chrome

Describe your issue

The Problem

Disabled menu items can't be clicked with a mouse (good), but you can still Tab to them and activate them with Enter/Space (bad).

How to Reproduce

<ul class="menu bg-base-200 w-56 rounded-box">
  <li><a href="#enabled">Enabled Item</a></li>
  <li class="menu-disabled"><a href="#disabled">Disabled Item</a></li>
  <li><a href="#enabled2">Enabled Item 2</a></li>
</ul>

1. Press Tab to navigate through the menu
2. The disabled item gets focus
3. Press Enter or Space - it activates!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions