-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Description
Provide a general summary of the issue here
When passing the aria-current prop to the Button component, it gets filtered out and does not get passed to the HTML button element.
🤔 Expected Behavior?
If an aria-current prop is passed to the Button, it should be applied to the HTML button element.
😯 Current Behavior
Any aria-current prop passed to the Button component does not make it to the HTML button element.
💁 Possible Solution
Update useButton to include the aria-current prop in the list of ARIA props allowed to pass through.
🔦 Context
We are building a Pagination component that uses Button instead of Link because the pagination may not always be tied to the current location (e.g., simple client-side pagination). We want to apply aria-current="true" to the button representing the current page of data, but it does not get passed correctly.
🖥️ Steps to Reproduce
Version
"react-aria-components": "^1.1.1"
What browsers are you seeing the problem on?
Firefox
If other, please specify.
No response
What operating system are you using?
macOS
🧢 Your Company/Team
No response
🕷 Tracking Issue
No response