In the Control Settings dialog, in the Label tab, form authors would have the option of either entering a label, as it is the case now, or to select one (or multiple, if #4758 is implemented) Explanatory Text "fields" as providing the label for the current field.
We could make that selection easier by first suggesting Explanatory Text fields that are on the same line or the same column as the current field, if any.
In the form definition:
When an Explanatory Text is selected as a label, maybe change the fr:explanation into an fr:label, as shown below. Having an fr:label would be needed by the XForms, but might make things more complex for Form Builder. So, instead, we might want to keep the fr:explanation in the form definition, and transform it into an fr:label at runtime.
On the control, add an aria-labelledby="…" pointing to the label (we could do this "preemptively" even if for now we support labels referenced by multiple controls or controls referencing multiple labels, so Form Builder doesn't ultimately have support both a for on the fr:explanation or xf:labelandaria-labelledby controls).
At the UI level, in Form Builder:
In the form definition:
fr:explanation
into anfr:label
, as shown below. Having anfr:label
would be needed by the XForms, but might make things more complex for Form Builder. So, instead, we might want to keep thefr:explanation
in the form definition, and transform it into anfr:label
at runtime.aria-labelledby="…"
pointing to the label (we could do this "preemptively" even if for now we support labels referenced by multiple controls or controls referencing multiple labels, so Form Builder doesn't ultimately have support both afor
on thefr:explanation
orxf:label
andaria-labelledby
controls).+1 from customer