cms icon indicating copy to clipboard operation
cms copied to clipboard

A11y/use fieldsets for prefs

Open gcamacho079 opened this issue 2 years ago • 1 comments

Description

Use fieldsets for accessibility and dev preferences (Resolves DEV-333).

Also fixes an issue where fieldset elements are nested inside fieldset elements for both radio groups and checkbox groups.

Related issues

gcamacho079 avatar Jun 30 '22 23:06 gcamacho079

DEV-333 Accessibility and Development headings should use fieldset/legend

Because controls are visually grouped, they should be a part of a fieldset element.

For each group of checkboxes, the heading/label should use a legend element, and the wrapping element should use a fieldset element

Resolves CMS-047

linear[bot] avatar Jun 30 '22 23:06 linear[bot]

@gcamacho079 Just merged 4.3 into this branch, and had to recreate your templates/users/_edit.twig edits in the process, since the user preferences changed a bit in 4.2. Let me know if it still looks good: https://github.com/craftcms/cms/pull/11534/commits/42f7ee854f370b0eb6dc93ec8b249410b01536b1

brandonkelly avatar Aug 11 '22 16:08 brandonkelly

@brandonkelly just tested and made the following changes:

  • "Development Settings" was added as a translation, and used as the legend for the dev-related checkbox group
  • Removed the inner-nested fieldset in favor of a div
  • Added a heading above the first section ("Location") so that group of fields isn't missed if users are navigating via heading levels only

gcamacho079 avatar Aug 11 '22 17:08 gcamacho079

👍🏻 Replaced “Location” with “General”, and also split the Debug Toolbar-related development settings into their own checkbox group.

The new user preferences form, with 2nd level headings “General”, “Accessibility”, and “Development”

brandonkelly avatar Aug 12 '22 14:08 brandonkelly