Use semantic markup instead of repeated hyphens to represent hierarchical taxonomy terms

Created on 15 December 2022, about 2 years ago
Updated 20 January 2023, almost 2 years ago

Problem/Motivation

On a node edit page, when selecting taxonomy terms, if the taxonomy terms are hierarchical, the child terms will be identified by having their names prefixed by one or more hyphens. This isn't semantic markup and could create an accessibility issue. The checkboxes are grouped by a fieldset but there is no list markup.

The hyphens are added in TermSelection::getReferenceableEntities() and the set of checkboxes is generated in OptionsButtonsWidget::formElement().

Proposed resolution

Display the checkboxes in an unordered list. For child taxonomy terms, display those as nested unordered lists under their parent. CSS can be used to remove the bullet from the unordered lists so that each checkbox serves as the bullet.

Feature request
Status

Active

Version

10.1

Component
Taxonomy 

Last updated 34 minutes ago

  • Maintained by
  • 🇺🇸United States @xjm
  • 🇬🇧United Kingdom @catch
Created by

🇨🇦Canada Liam Morland Ontario, CA 🇨🇦

Live updates comments and jobs are added and updated live.
  • Accessibility

    It affects the ability of people with disabilities or special needs (such as blindness or color-blindness) to use Drupal.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

No activities found.

Production build 0.71.5 2024