umbraco / Umbraco.Forms.Issues

Public issue tracker for Umbraco Forms
29 stars 0 forks source link

Accessibility criteria 1.3.1 WCAG Level A: Fieldsets #1163

Closed RachBreeze closed 4 months ago

RachBreeze commented 4 months ago

When building a form, the fields are automatically placed into a fieldset. However the value for the fieldset legend is optional:

image

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:

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

AndyButland commented 4 months ago

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.

RachBreeze commented 4 months ago

Hi @AndyButland

That's perfect thank you