mantine icon indicating copy to clipboard operation
mantine copied to clipboard

Input.Error should have `role='alert'`?

Open tianhuil opened this issue 3 years ago • 1 comments

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 avatar Aug 05 '22 19:08 tianhuil

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

rtivital avatar Aug 06 '22 07:08 rtivital

Fixed in 5.1.4

rtivital avatar Aug 12 '22 07:08 rtivital