[field-label] a11y review
Feedback
- required should propagate to the labelled field (probably as aria-required to avoid validation)
- alternatively required could propagate the other way from the controlled field to the label. Expecting a dev to specify in both places is problematic.
We currently manage this on the sp-field-label as that's where the visual affectation will live, however the functional implications of the application of require lives on the field in question. It may be that we want the Field Label to query whether it is required or not from the Field that is associated to. This also presupposes a possible API wide move towards Field elements to work more like Slider which owns its own label as opposed to Textfield which does not, but still offers options to non-visible labeling.
Demarcating that something is "required" involves being able to manage required both in places where the browser natively understands it as well as synthetic contexts where we'd need translatable text to outline this reality to a users (see the current implementation of Picker).
Options that I can think of right now:
- add requiredLabel property to something for direct setting
- add context resolved requiredLabel property to something, similar to language in Slider and Number Field
- measure the time between now and when https://github.com/adobe/spectrum-web-components/tree/combobox-praticum is ready to adopt into the library (this only removed the need to do this in Picker, it doesn't solve this system wide for other such patterns)