With the new plugins installed and enabled open an article, select a schema and check the html
Valid markup with no accessibility errors
But it shouldnt be a label anyway
The fields in the subform-wrapper must be a fieldset with a legend as the first entry in the fieldset instead of the orphaned label above.
Labels |
Added:
No Code Attached Yet
|
Labels |
Added:
a11y
|
It's just bad markup in the xml
basicaly these are fieldsets not subforms
Just rechecked and rechecked.
The problem is 100% due to the schema plugin xml. There is no other xml form defintion in Joomla that has "nested" <form>
elements.
In fact nested forms are very specifically mentioned
Warning: It's strictly forbidden to nest a form inside another form. Nesting can cause forms to behave unpredictably, so it is a bad idea
source MDN
(just because we call something a subform doesnt mean that it is)
If they would just render as a fieldset then it would be fine. but no matter what I have tried it doesnt render as a fieldset. I must be missing somethign obvious
This layout renders a "non multiple" subform: layouts/joomla/form/field/subform/default.php
yes i see that - which is wrong afaict and it should be a fieldset with a legend - see image above - but whenever I try to add it as a fieldest it doesnt render correctly. I must be missing something
The legend will not show up as you expected. It can be only within that layout.
On your screenshot it is a field label, that rendered in label
layout.
In result can be:
<label></label> => from field label
<fieldset> |
<legend></legend> | => from field input
</fieldset> |
that is what is wrong and breaks accessibility and html standards
Following will not work?
<label for="blabla-input"></label>
<fieldset id="blabla-input">
<legend aria-hidden></legend>
</fieldset>
If I right remember we use the same for checboxes
/radio
field fieldset.
Yes thats one option. The "difference" is that for checkboxes/radio we are creating a fieldset out of a single field. In this case we should be rendering a fieldest containing several fields
In theory it should be possible to do oposite: the label is hidden with hiddenLabel="true"
in xml
, and the legend visible.
it shouldnt be necessary. we already render multiple fieldsets elsewhere
Labels |
Added:
bug
|
Is this schemaorg specific or a global bug in Joomla when using subforms?