mantine
mantine copied to clipboard
Input.Error should have `role='alert'`?
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'.
Yes, seems like we are missing it, would you like to create a PR for this?
Fixed in 5.1.4