Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

aria validationBehavior of <Select/> component #7605

Open
BRobin55 opened this issue Jan 13, 2025 · 1 comment
Open

aria validationBehavior of <Select/> component #7605

BRobin55 opened this issue Jan 13, 2025 · 1 comment

Comments

@BRobin55
Copy link

Provide a general summary of the issue here

The aria value of the validationBehavior prop does not work as expected for the <Select/> component.
An aria-invalid attribute is not being set in the dom.

🤔 Expected Behavior?

When the <Select/> component is invalid and the validationBehavior prop is set to aria, an aria-invalid attribute should appear in the dom.

😯 Current Behavior

The component receives the data-invalid attribute. But an aria-invalid attribute can not be found.

💁 Possible Solution

No response

🔦 Context

I would expect the behavior to be similar to the validationBehavior props from <ComboBox/>. Here the <Input/> component sets the aria-invalid attribute to true, if the <ComboBox/> component is invalid.

🖥️ Steps to Reproduce

https://codesandbox.io/p/sandbox/exciting-mirzakhani-jv4zpz?workspaceId=ws_R7CWoq4CRHAjZhDgunSPoB

Version

3.31.0

What browsers are you seeing the problem on?

Chrome

If other, please specify.

No response

What operating system are you using?

MacOS 15.1.1

🧢 Your Company/Team

No response

🕷 Tracking Issue

No response

@devongovett
Copy link
Member

devongovett commented Jan 14, 2025

aria-invalid is not supported on button elements according to the ARIA spec. It's only supported on inputs. Can you describe why this is a problem for you?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants