You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Indeed, when using the UButton with a :to prop it creates an html <a>.
I can make a fix to remove the href when its disabled, but the visual style of the button won't be reflected as the disabled attribute doesn't exist on an <a>.
With this commit, when setting disabled on a <UButton> / <ULink> (used underneath by the button), the <a> HTML element will have its href removed and the role="link" aria-disabled="true" attributes added.
This will make the link semantically valid. However, the styling will not be applied as Tailwind CSS disabled variant can't be used for this case.
Version
@nuxthq/ui: v2.2.0 & v2.6.0
nuxt: v3.5.0 & v3.6.5
Reproduction Link
Stackblitz repro
Steps to reproduce
What is Expected?
The
disabled
button that has ato
prop should be unclickable.What is actually happening?
The
disabled
button with ato
prop not only is clickable with the correct link, but it is visibly active regardless of thedisabled
state.The text was updated successfully, but these errors were encountered: