Accessibility: title attribute the same as the text

Created on 30 May 2024, 11 months ago

Problem/Motivation

The problem is that in the module template the title attribute and the text are the same.

Steps to reproduce

Install the module and apply it to a menu. Inspect the code and you will see:

<a id="toggle-icon" class="toggle responsive-menu-toggle-icon" href="#off-canvas">
  <span class="icon"></span><span class="label">Menu</span>
</a>

Proposed resolution

This can be resolved by removing the title attribute.

Remaining tasks

Remove the title attribute with menu text.

🐛 Bug report
Status

Active

Version

4.4

Component

Code

Created by

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

Comments & Activities

  • Issue created by @serverjohn
  • This is my first time supplying a patch... I have removed the title attribute.

    Some information on why this change makes sense. WCAG H33: Supplementing link text with the title attribute.

    The objective of this technique is to demonstrate how to use a title attribute on an anchor element to provide additional text describing a link. The title attribute is used to provide additional information to help clarify or further describe the purpose of a link. If the supplementary information provided through the title attribute is something the user should know before following the link, such as a warning, then it should be provided in the link text rather than in the title attribute.

  • Status changed to Needs review 11 months ago
  • Open on Drupal.org →
    Core: 9.5.x + Environment: PHP 7.4 & MySQL 8
    last update 11 months ago
    Waiting for branch to pass
  • Issue was unassigned.
  • Status changed to RTBC about 20 hours ago
  • 🇪🇨Ecuador jwilson3

    The fix accurately removes the redundant title attribute from the link. Use of the title attribute as a technique to provide additional information is generally considered as harmful due to "extensive user agent limitations in supporting access to the title attribute". In this case the title is not even adding any additional context, since it redundantly indicates the same text as the button itself.

Production build 0.71.5 2024