cms
cms copied to clipboard
A11y/use fieldsets for prefs
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
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
@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 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
👍🏻 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”](https://user-images.githubusercontent.com/47792/184369540-130c6859-9158-4a64-b72d-83a860034a76.png)