Remove outdated anchors

Created on 27 September 2024, 7 months ago

Problem/Motivation

During an accessibility review all of the element anchors on /styleguide were flagged because they contain the deprecated name attribute, for example, <a name="a"></a>. I'm not certain that an up-to-date validator would flag these or not since WCAG dropped most HTML parsing as a requirement for compatibility.

I realize that this is probably a low-priority thing to change since this isn't meant to be a visitor-facing page. But I'm using the Styleguide during the development of a custom theme. Fixing this cuts WAY down on the amount of errors the validator throws when scanning the page. And it's one less false-positive that my reviewers will report to me once I turn them loose on the theme.

Proposed resolution

Move the anchor name to the id on the element heading.

For good measure, add aria-label and aria-describedby attributes to the element container.

πŸ“Œ Task
Status

Active

Version

2.0

Component

User interface

Created by

πŸ‡ΊπŸ‡ΈUnited States dcam

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @dcam
  • Merge request !16Moved the anchor name to the heading id β†’ (Open) created by dcam
  • Pipeline finished with Failed
    7 months ago
    Total: 4356s
    #294947
  • πŸ‡ΊπŸ‡ΈUnited States dcam

    I don't know why the previous major test is failing. I don't have a D9 test environment on this machine because all our sites are on D10. I'll have to check it on my personal time later.

  • Pipeline finished with Success
    6 months ago
    Total: 155s
    #298566
  • Pipeline finished with Success
    6 months ago
    Total: 157s
    #298567
  • πŸ‡ΊπŸ‡ΈUnited States dcam

    It was failing on D9 because I used the clean_unique_id Twig filter, which was introduced in D10.1. I initially changed it to clean_id before remembering that the point of putting it in was to guarantee the description id's uniqueness. So I took out the filter entirely. If this is committed after the D11 upgrade issue - which I hope will remove D9 compatibility - then you might consider reverting those two commits to restore the clean_unique_id filter.

  • Pipeline finished with Success
    6 months ago
    Total: 167s
    #299976
  • πŸ‡ΊπŸ‡ΈUnited States dcam

    I'm adding another change to the description wrapper. Currently the descriptions are wrapped in a <p> tag.

    The only time that the item descriptions are used is for image styles. But those descriptions are themed as an item list. The resulting <ul> are then wrapped by the <p>, which is invalid HTML. It would be better if the descriptions were wrapped in a <div> instead.

Production build 0.71.5 2024