Disallowed markup in definition lists

Created on 11 July 2023, over 1 year ago
Updated 14 July 2023, over 1 year ago

Problem/Motivation

On several pages such as admin/structure and node/add, the following error appears with a basic A11y scan

<dl> elements must only directly contain properly-ordered <dt> and <dd> groups, <script>, <template> or <div> elements

In these cases, it is because there is an <a> tag in the definition list markup. These items should remain links, so we should change the markup to use something other than definition lists

Steps to reproduce

Proposed resolution

Change the <dl><dd><dt> to <div>s. Instead of using definitions, associate elements using aria-details.

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Fixed

Version

3.0

Component

Code

Created by

🇺🇸United States bnjmnm Ann Arbor, MI

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

  • Issue created by @bnjmnm
  • @bnjmnm opened merge request.
  • Status changed to Needs review over 1 year ago
  • 🇺🇸United States bnjmnm Ann Arbor, MI

    MR changes two templates to use divs instead of definition lists, and uses aria-details to associate the label and description now that it isn't automatically associated via html tag.

  • 🇮🇳India Harish1688 India

    Hi,

    Tested the MR !273 to address the issue error appears with a basic A11y scan. Now it's works fine after '<dl><dd><dt> to <div>' tags change in MR.

    Testing Steps:
    1. Install the Drupal 10.0.x version and enable gin 8.x.
    2. switch to MR and verified the changes.

    Attached the screen for references.
    Beore:

    After:

    Looks Good for RTBC

  • First commit to issue fork.
  • Status changed to Fixed over 1 year ago
  • 🇨🇭Switzerland saschaeggi Zurich

    Great, thanks @bnjmnm & @Harish1688!

  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024