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
4747}
4848
4949interface AriaBaseButtonProps extends FocusableDOMProps , AriaLabelingProps {
50- /** Indicates whether the element is disabled to users of assistive technology. */
51- 'aria-disabled' ?: boolean | 'true' | 'false' ,
5250 /** Indicates whether the element, or another grouping element it controls, is currently expanded or collapsed. */
5351 'aria-expanded' ?: boolean | 'true' | 'false' ,
5452 /** 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
147147 ref = { ref }
148148 aria-labelledby = { ariaLabelledby }
149149 slot = { props . slot || undefined }
150- aria-disabled = { isPending ? 'true' : ( buttonProps [ 'aria-disabled' ] ) }
150+ aria-disabled = { isPending ? 'true' : buttonProps [ 'aria-disabled' ] }
151151 data-disabled = { props . isDisabled || undefined }
152152 data-pressed = { renderValues . isPressed || undefined }
153153 data-hovered = { isHovered || undefined }
Original file line number Diff line number Diff line change @@ -57,18 +57,6 @@ describe('Button', () => {
5757 expect ( button ) . toHaveAttribute ( 'aria-current' , 'page' ) ;
5858 } ) ;
5959
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-
7260 it ( 'should support slot' , ( ) => {
7361 let { getByRole} = render (
7462 < ButtonContext . Provider value = { { slots : { test : { 'aria-label' : 'test' } } } } >
You can’t perform that action at this time.
0 commit comments