Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Accessibility criteria 1.3.1 WCAG Level A: Fieldsets #1163

Closed
RachBreeze opened this issue Feb 12, 2024 · 2 comments
Closed

Accessibility criteria 1.3.1 WCAG Level A: Fieldsets #1163

RachBreeze opened this issue Feb 12, 2024 · 2 comments
Labels
release/13.1.0 state/sprint-candidate We're trying to get this in a sprint at HQ in the next few weeks type/feature

Comments

@RachBreeze
Copy link

RachBreeze commented Feb 12, 2024

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:

  • 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

@AndyButland AndyButland added type/feature state/sprint-candidate We're trying to get this in a sprint at HQ in the next few weeks release/13.1.0 labels Feb 23, 2024
@AndyButland
Copy link

AndyButland commented Feb 27, 2024

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
Copy link
Author

Hi @AndyButland

That's perfect thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release/13.1.0 state/sprint-candidate We're trying to get this in a sprint at HQ in the next few weeks type/feature
Projects
None yet
Development

No branches or pull requests

2 participants