- Issue created by @vegardjo
- π¨π¦Canada Liam Morland Ontario, CA π¨π¦
This is happening because it is a component of type
select
, but it is themed using adiv
element inbef-links.html.twig
.Why does it use a
select
component? That appears to be set in classDefaultWidget
. - First commit to issue fork.
- Merge request !173Issue #3528584 by vegardjo: Html validation error due to non allowed attributes β (Open) created by smustgrave
- π³π΄Norway vegardjo
Thanks, I will try the patch shortly!
However, found another related bug. Not sure it's better tackled here or in a new issue, but the full markup is:
<label for="edit-type--3">Content type</label> <div class="bef-links-use-ajax bef-links" data-drupal-selector="edit-type" multiple="multiple" name="type" id="edit-type--3"> [...]
..we can't use a
label
for adiv
, but we could if it was aselect
, so I guess it has the same root cause. - π³π΄Norway vegardjo
I can confirm that the PR as of now removes the validation errors of
multiple
andname
, and also that the error described in my comment #6 remains. - π¨π¦Canada Liam Morland Ontario, CA π¨π¦
The
label
element issue is addressed in π Accessibility: Orphaned form label Active . - π³π΄Norway vegardjo
I don't believe that is exactly the same issue, the validation error is not the same, and also the fix would not fix this. The label element in that issue is in front of an
<input>
element, which is allowed, but the label in my case prefixes a<div>
, which since it is not a form element, should not have a<label>
at all.The reason is likely that when using a select element it is likely also using the form-element-label.html.twig.
Not really sure what it could use instead, though..