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

Input.Error should have role='alert'? #2023

Closed
tianhuil opened this issue Aug 5, 2022 · 2 comments
Closed

Input.Error should have role='alert'? #2023

tianhuil opened this issue Aug 5, 2022 · 2 comments
Labels
Fixed patch Completed issues that will be published with next patch (1.0.X)

Comments

@tianhuil
Copy link
Contributor

tianhuil commented Aug 5, 2022

What package has an issue

@mantine/core

Describe the bug

It looks like that error messages on input do not have role='alert'. This both makes it harder to test for error message using react testing library's screen.findAllByRole and is less w3 accessible. Should we add this in?

See https://github.com/mantinedev/mantine/blob/master/src/mantine-core/src/Input/InputError/InputError.tsx#L20-L35

What version of @mantine/hooks page do you have in package.json?

On master branch

If possible, please include a link to a codesandbox with the reproduced problem

No response

Do you know how to fix the issue

Yes

Are you willing to participate in fixing this issue and create a pull request with the fix

Yes

Possible fix

Add in role='alert'.

@tianhuil tianhuil added the bug label Aug 5, 2022
@rtivital
Copy link
Member

rtivital commented Aug 6, 2022

Yes, seems like we are missing it, would you like to create a PR for this?

@rtivital rtivital added Fixed patch Completed issues that will be published with next patch (1.0.X) and removed bug labels Aug 11, 2022
@rtivital
Copy link
Member

Fixed in 5.1.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Fixed patch Completed issues that will be published with next patch (1.0.X)
Projects
None yet
Development

No branches or pull requests

2 participants