-
-
Notifications
You must be signed in to change notification settings - Fork 370
Closed
Labels
component: buttonChanges related to the button component.Changes related to the button component.type: expected behaviorThe current behavior is already the one expected.The current behavior is already the one expected.
Description
Bug report
Current behavior
When using a non-button element with nativeButton={false}, role="button" is always applied.
I realise that this is a helper for accessibility, but I would expect a link to retain it's accessible role.
Expected behavior
The component already checks the element type, and could perhaps only apply the role to non-links?
Reproducible example
https://ui.shadcn.com/docs/components/base/button#link-1
Base UI version
1.1.0
Which browser are you using?
Chrome (and others)
Which OS are you using?
macOs
Which assistive tech are you using (if applicable)?
N/A
Additional context
See the Radix example:
https://ui.shadcn.com/docs/components/radix/button#link-1
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
component: buttonChanges related to the button component.Changes related to the button component.type: expected behaviorThe current behavior is already the one expected.The current behavior is already the one expected.