-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Menu items that are neither <a> nor <span> do not show border #351
Comments
I don't think giving clickable style to the whole |
I don't think the left-hand border is clickable style, it's rather a kind of highlighting for menu items. And yes, the A more complete fix would be to have the actual |
@saadeghi Thanks! |
Steps to reproduce
Create some markup like
Yes, that's an adapted version of the bordered example at https://daisyui.com/components/menu
Expected behavior
Judging from where the classes are attached, I expect the
<li>
to show the border regardless of what children they have. Or at least for all clickable HTML elements.Actual behavior
The
<li>
show the border if and only if their child is an<a>
or<span>
.Why is this bad?
Accessibility is impaired: following WCAG and a11y-101.com,
<a>
should only be used when clicking the element triggers a navigation to another page. When clicking an element just changes some state on the page, use a<button>
.The text was updated successfully, but these errors were encountered: