Accessibility criteria 1.3.1 WCAG Level A: Fieldsets
Closed this issue · 2 comments
When building a form, the fields are automatically placed into a fieldset. However the value for the fieldset legend is optional:
For accessibility "criteria 1.3.1 Info and Relationships" to be compliant if a <fieldset>
element is added into mark up then a legend should be added. The resolution is to either:
- Only render fieldsets if a legend is in the markup
- Make "Untitled group (optional)" mandatory
More information on 1.3.1 criteria can be found here https://www.w3.org/WAI/WCAG21/Understanding/info-and-relationships.html (note it is a WCAG Level A criteria, so it must be resolved for all forms to work with assistive technology, I appreciate this may be an issue for backwards compatibility)
(Sorry the "must" is from WCAG Defitinitions, not me)
This item has been added to our backlog AB#38196
We'll be looking to add this in 13.1, but, as you noted, it can't really be a change we make to the default behaviour as it would potentially cause issues for people upgrading (having to complete a legend, and then having it render on the front-end).
So we'll put it behind a configuration switch:
"Umbraco": {
"Forms": {
"FormDesign": {
"MandatoryFieldsetLegends": true|false,
}
}
}
If this MandatoryFieldsetLegends
is set to true
, you won't be able to save a form unless the fieldset legend - labelled in the UI as the caption for the group - is completed. The default will be false
.
Hi @AndyButland
That's perfect thank you