-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Description
Is this a regression?
- Yes, this behavior used to work in the previous version
The previous version in which this bug was not present was
No response
Description
Currently, aria-* inputs like aria-describedby for the radio button are typed as strings. If we want to conditionally show a description for the radio and associate it for SR users, then we either retain aria-describedby="myId" when the element with myId no longer exists, or we set it to an empty string aria-descirbedby="''". Both of this options result in errors reported by a11y tools like the ARC toolkit extension.
Let's allow setting null, so that we drop aria-describedby when the description gets dynamically removed.
Reproduction
StackBlitz link: https://stackblitz.com/edit/components-issue-starter-4hhqnzqv?file=src%2Fmain.ts,src%2Findex.html
Steps to reproduce:
- Click the button to show/hide radio button description
- Run ARC toolkit extension and see error that aria-describedby value is invalid.
Expected Behavior
We should be able to set aria-describedby to null so that it can be dropped from the element
Actual Behavior
ARC toolkit error
Environment
- Angular:
- CDK/Material:
- Browser(s):
- Operating System (e.g. Windows, macOS, Ubuntu):