Open jcgueriaud1 opened 12 months ago
The reason why <label>
element is created even without property being set is that LabelController
is used:
https://github.com/vaadin/web-components/blob/25bb2617a12ecdfcacc188fe3d4c16c62a5f0033/packages/field-base/src/label-controller.js#L11-L14
See for example HelperController
that is similar, but creates helper node lazily once helperText
property is set:
What is the problem?
For the
vaadin-select
, we have an empty label for screen reader with the slotsr-label
. I don’t think it’s a big issue since it’s not linked to the input and it’s empty.But the label is unnecessary and some accessibility checkers are complaining about empty
<label>
Browsers
Screen Readers