`[aria-*]` attributes do not match their roles when using FA icons

Created on 18 April 2022, over 2 years ago
Updated 22 August 2024, about 1 month ago

Problem/Motivation

External links aren't using properly the aria-label, so assistive technology browsers aren't reading properly the label. This is an accessibility issue that is raised by automatic testing tools like e.g. Lighthouse.

Steps to reproduce

Add a external link. Check the Lighthouse tab in Google Chrome.

Proposed resolution

#0 proposes removing the aria-label.
#4 proposes moving aria-label into link wrapping element and adding role=img and aria-hidden=true to icon span.

Remaining tasks

Decide which one works best.

Related WCAG success criteria and techniques

User interface changes

None for visual browsers.
Corrected screen reader (i.e. VoiceOver in this case) for assistive technology browsers.

API changes

None.

Data model changes

None.

Original Report

Users of screen readers and other assistive technologies get information by HTML code like label or aria attributes. If the HTML tag and attributes doesn’t match, screen reader will not be able to get the correct information. And users will be confused and feel difficulty in viewing our site.

πŸ› Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

πŸ‡¨πŸ‡³China randy Tang

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

Merge Requests

Comments & Activities

Not all content is available!

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

Production build 0.71.5 2024