Open bdahl1 opened 2 years ago
This is a unique request. The model we are following is that the ID used is addressing an internal need to have an ID on the input
element and then the label
element uses the for
attribute. This is necessary in HTML to bind these elements and is an accessibility requirement.
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/radio
Regardless of the platform, this model is strongly recommended. Alternatives to this model make use of Aria tags, but only when the native label
and input
elements are not being used.
I am not 100% up on Angular, but looking at this example https://material.angular.io/components/radio/overview while the editor is not responsible for the placement of the ID, this is still being used behind the scenes. From this, I can only assume that the mat-radio-button
is creating IDs on the fly.
I feel like this is the feature you are looking for?
Will review for updating documentation to support this request
Describe the bug
The id attribute is required for auro-radio (and auro-checkbox) to function properly... at least in Angular.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The component should function as normal. It does not, you can't select values.
Desktop (please complete the following information):
Additional context
I'm not sure if this is a "bug" or "feature request" but typically I try to avoid setting ids whenever possible because as soon as you have to dynamically build something up or want to re-use a component you end up having a bad time.