Skip to content

Commit

Permalink
Allow user to override button aria-disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
iansan5653 authored Mar 22, 2024
1 parent 4389e59 commit d3e0461
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/react/src/Button/ButtonBase.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -89,14 +89,14 @@ const ButtonBase = forwardRef(
<StyledButton
as={Component}
sx={sxStyles}
aria-disabled={loading ? true : undefined}
{...rest}
ref={innerRef}
data-block={block ? 'block' : null}
data-inactive={inactive ? true : undefined}
data-loading={Boolean(loading)}
data-no-visuals={!LeadingVisual && !TrailingVisual && !TrailingAction ? true : undefined}
data-size={size === 'small' || size === 'large' ? size : undefined}
aria-disabled={loading ? true : undefined}
aria-describedby={[loadingAnnouncementID, ariaDescribedBy]
.filter(descriptionID => Boolean(descriptionID))
.join(' ')}
Expand Down

0 comments on commit d3e0461

Please sign in to comment.