Duplicate ID in Anchor Icon SVG Causes Accessibility Issues

Created on 8 March 2024, 9 months ago
Updated 18 September 2024, 3 months ago

Problem/Motivation

I've encountered an accessibility issue related to the Anchor Link module for CKEditor 5 within a Drupal installation. The module uses an SVG icon (`icons/anchor.svg`) for the anchor button in CKEditor's toolbar, where the `
` elements have duplicate `id="Shape"` attributes. This duplication can cause problems for assistive technologies due to the non-unique IDs within the document, violating HTML standards for ID uniqueness.

Steps to reproduce

  1. Install the Anchor Link module for CKEditor 5 on a Drupal site.
  2. Enable the module and navigate to a page with CKEditor enabled.
  3. Use an accessibility tool or inspection of the HTML to observe the rendered CKEditor toolbar, specifically the anchor button icon.
  4. Notice that the SVG icon for the anchor button contains duplicate `id="Shape"` attributes.

Proposed resolution

A simple fix would be to remove the `id` attributes from the `
` elements in the `icons/anchor.svg` file if they are not required for CSS or JavaScript. Alternatively, if the IDs are necessary, ensure they are unique by renaming them to something more specific to their function or appearance.

Remaining tasks

  • ✅ File an issue
  • ➖ Create and attach the patch for the proposed solution
  • ➖ Testing to ensure no regression
  • ➖ Automated unit testing coverage
  • ➖ Automated functional testing coverage
  • ➖ UX/UI designer responsibilities
  • ➖ Readability
  • ➖ Accessibility
  • ➖ Performance
  • ➖ Security
  • ➖ Documentation
  • ➖ Code review by maintainers
  • ➖ Full testing and approval
  • ➖ Credit contributors
  • ➖ Review with the product owner
  • ➖ Release notes snippet
  • ❌ Release

API changes

  • N/A

Data model changes

  • N/A

Release notes snippet

  • N/A
🐛 Bug report
Status

Needs review

Version

3.0

Component

Code

Created by

🇺🇸United States Tsegaye

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

Comments & Activities

Production build 0.71.5 2024