Skip to content

Commit 9e584b6

Browse files
committed
Revert "allow aria-disabled pass-through in useButton"
This reverts commit 788773e.
1 parent 788773e commit 9e584b6

File tree

2 files changed

+1
-9
lines changed

2 files changed

+1
-9
lines changed

packages/@react-aria/button/src/useButton.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,7 @@ export function useButton(props: AriaButtonOptions<ElementType>, ref: RefObject<
114114
'aria-expanded': props['aria-expanded'],
115115
'aria-controls': props['aria-controls'],
116116
'aria-pressed': props['aria-pressed'],
117-
'aria-current': props['aria-current'],
118-
'aria-disabled': props['aria-disabled']
117+
'aria-current': props['aria-current']
119118
})
120119
};
121120
}

packages/@react-aria/button/test/useButton.test.js

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,4 @@ describe('useButton tests', function () {
6161
expect(typeof result.current.buttonProps.onKeyDown).toBe('function');
6262
expect(result.current.buttonProps.rel).toBeUndefined();
6363
});
64-
65-
it('handles aria-disabled passthrough for button elements', function () {
66-
let props = {'aria-disabled': 'true'};
67-
let {result} = renderHook(() => useButton(props));
68-
expect(result.current.buttonProps['aria-disabled']).toBeTruthy();
69-
expect(result.current.buttonProps['disabled']).toBeUndefined();
70-
});
7164
});

0 commit comments

Comments
 (0)