[button] Should focusableWhenDisabled expose data-focusable?
Author: lyzno1Created Sep 25, 2026Updated Sep 25, 2026
Labelsstatus: waiting for maintainer
Ask a question
Button and Toolbar.Button both accept focusableWhenDisabled, but only Toolbar.Button exposes that setting as data-focusable.
<Button disabled focusableWhenDisabled />
<Toolbar.Button disabled focusableWhenDisabled />In the first case, the button remains focusable but has no data-focusable attribute. In the second case, data-focusable is present and can be used as a CSS styling hook. This also applies when the buttons are enabled: the attribute reflects the focusableWhenDisabled setting, not the current focus state.
Is this difference intentional, or should Button expose data-focusable when focusableWhenDisabled is true? The same pattern in Toolbar.Button was mentioned during the original Button PR review: https://github.com/mui/base-ui/pull/2363#discussion_r2432390082
Source: mui/base-ui