-
-
Notifications
You must be signed in to change notification settings - Fork 321
Closed
Labels
scope: all componentsWidespread work has an impact on almost all components.Widespread work has an impact on almost all components.type: bugIt doesn't behave as expected.It doesn't behave as expected.
Description
Bug report
Current behavior
When applying the ₩disabled₩ attribute to elements used as buttons, such as XXX.Trigger or XXX.Close, both the disabled attribute and the data-disabled attribute are applied in the HTML.
These elements can be rendered as non-button elements using prop like render={<span />}. However, the disabled attribute remains in this case. According to the MDN documentation, the disabled attribute is not applied to span tags. Therefore, the aria-disabled attribute should be applied instead.
Expected behavior
- When an element is rendered as a
buttontag, apply thedata-disabledanddisabledattributes. - When an element is rendered as a tag other than a
button, apply thedata-disabledandaria-disabledattributes.
Reproducible example
https://stackblitz.com/edit/kn1mbuqo?file=src%2FApp.tsx
Base UI version
1.0.0
Which browser are you using?
Chrome
Which OS are you using?
Mac OS
Which assistive tech are you using (if applicable)?
x
Additional context
x
Metadata
Metadata
Assignees
Labels
scope: all componentsWidespread work has an impact on almost all components.Widespread work has an impact on almost all components.type: bugIt doesn't behave as expected.It doesn't behave as expected.