Description
When using the aria-invalid
attribute on a radio button, the radio button becomes non-functional and cannot be clicked, but it is still shown in red as if it were in an invalid state. This behavior is unexpected and confusing for users.
According to the W3C specification for HTML5 forms, the aria-invalid
attribute should not be used on radio buttons.
To reproduce the issue, please see the provided CodeSandbox link:
https://codesandbox.io/s/db-ui-core-radio-aria-invalid-55fh6z?file=/src/App.tsx
There you see that you are not able to click on the radio buttons to change the state.
Expected behavior: The radio button should function as expected, regardless of whether the aria-invalid
attribute is present or not.
See also documentation: https://db-ui.github.io/core/?p=viewall-elements-radio