File tree Expand file tree Collapse file tree 3 files changed +1
-15
lines changed Expand file tree Collapse file tree 3 files changed +1
-15
lines changed Original file line number Diff line number Diff line change @@ -47,8 +47,6 @@ export interface LinkButtonProps<T extends ElementType = 'button'> extends AriaB
47
47
}
48
48
49
49
interface AriaBaseButtonProps extends FocusableDOMProps , AriaLabelingProps {
50
- /** Indicates whether the element is disabled to users of assistive technology. */
51
- 'aria-disabled' ?: boolean | 'true' | 'false' ,
52
50
/** Indicates whether the element, or another grouping element it controls, is currently expanded or collapsed. */
53
51
'aria-expanded' ?: boolean | 'true' | 'false' ,
54
52
/** Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an element. */
Original file line number Diff line number Diff line change @@ -147,7 +147,7 @@ export const Button = /*#__PURE__*/ createHideableComponent(function Button(prop
147
147
ref = { ref }
148
148
aria-labelledby = { ariaLabelledby }
149
149
slot = { props . slot || undefined }
150
- aria-disabled = { isPending ? 'true' : ( buttonProps [ 'aria-disabled' ] ) }
150
+ aria-disabled = { isPending ? 'true' : buttonProps [ 'aria-disabled' ] }
151
151
data-disabled = { props . isDisabled || undefined }
152
152
data-pressed = { renderValues . isPressed || undefined }
153
153
data-hovered = { isHovered || undefined }
Original file line number Diff line number Diff line change @@ -57,18 +57,6 @@ describe('Button', () => {
57
57
expect ( button ) . toHaveAttribute ( 'aria-current' , 'page' ) ;
58
58
} ) ;
59
59
60
- it ( 'should not have aria-disabled defined by default' , ( ) => {
61
- let { getByRole} = render ( < Button > Test</ Button > ) ;
62
- let button = getByRole ( 'button' ) ;
63
- expect ( button ) . not . toHaveAttribute ( 'aria-disabled' ) ;
64
- } ) ;
65
-
66
- it ( 'should support aria-disabled passthrough' , ( ) => {
67
- let { getByRole} = render ( < Button aria-disabled = "true" > Test</ Button > ) ;
68
- let button = getByRole ( 'button' ) ;
69
- expect ( button ) . toHaveAttribute ( 'aria-disabled' , 'true' ) ;
70
- } ) ;
71
-
72
60
it ( 'should support slot' , ( ) => {
73
61
let { getByRole} = render (
74
62
< ButtonContext . Provider value = { { slots : { test : { 'aria-label' : 'test' } } } } >
You can’t perform that action at this time.
0 commit comments