origami
origami copied to clipboard
o-forms error summary: support inputs with no field title
o-forms creates an error summary based on field title. Sometimes an input is used without a field title, such as this terms & conditions checkbox on the signup page.
To add error summary support for inputs which are not in a parent field consider options such as:
- Should we require that a field title is provided but have a class to hide it (visually and to assistive tech)?
- Update error summary implementation to use a data attribute such as
input[data-o-forms-error-summary-label]when a form input has no field. - Something else?
Note: We can't use the input's label for the error summary because it reads "I confirm that I am..." Note: We should always use the field title where given, and only use any new configuration option when an input is not part of a parent field. That's because a field can include multiple inputs with multiple errors, but we only show 1 error for a field in the error summary.