Problem/Motivation

It is important that the Web be accessible to everyone in order to provide equal access and equal opportunity to people with disabilities.

Steps to reproduce

  • Create and publish a node with external links
  • Right click on the link created and inspect the element
  • View source and look for <span class="ext" aria-label="(link is external)">
  • On the console toolbar, click on Arc Toolkit
  • Click on "Run Test" and filter by "Errors"
  • The "Aria" section, under "Aria Usage", will report the following error

    aria-label=(link is external)tag: SPAN
    ariaLabelOnNonInteractiveElement - Error: aria-label is used on an element which does not reliably convey this attribute - Recommend: Put aria-label on an active element or an element with a role defined, or use visually hidden text instead

Proposed resolution

Aria-label should use visually hidden text.

Issue fork extlink-3182802

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

programmerdiego created an issue. See original summary.

programmerdiego’s picture

Issue summary: View changes
programmerdiego’s picture

Issue summary: View changes
programmerdiego’s picture

Issue summary: View changes
avpaderno’s picture

Version: 8.x-1.1 » 8.x-1.x-dev
Issue tags: -error
programmerdiego’s picture

Issue summary: View changes
avpaderno’s picture

Issue summary: View changes
avpaderno’s picture

Issue summary: View changes
henry.odiete’s picture

StatusFileSize
new1.17 KB

Patch provided to fix issue, adds role="img" and aria-hidden="true"

henry.odiete’s picture

Status: Active » Needs review
henry.odiete’s picture

pr1859’s picture

Update aria-label="(new window)", resolved accessibility issue for us on LevelAccess tools Access Assistant/Continuum

madhaze’s picture

StatusFileSize
new1.27 KB

When using the Font Awesome version. `aria-label` get added to a span with throws an error when tested with multiple accessibility scans do to incompatible aria role.

This patch removes the `aria-label` and adds the external message in a span with the drupal class `visually-hidden` to still have this message available to screen readers and not be flagged in accessibility scans.

jbaum_13’s picture

When I tried #13 it did work however it broke the font awesome icons used to show external links and mailto links.

tlo405’s picture

Status: Needs review » Reviewed & tested by the community

I'm using a different tool for accessibility scans on my site and #13 fixed the issue. All font awesome icons are still working as well.

herved’s picture

Oh snap, I just found about this issue, after creating #3378557: Fix Font Awesome markup and CSS

I proposed the same there but using FA's sr-only class and with an aria-hidden on the icon. There is also a CSS issue with FontAwesome (no spacing) which the patch there fixes as well.

anybody’s picture

Status: Reviewed & tested by the community » Needs work

Could someone please provide this as merge request? What about #16?

douggreen made their first commit to this issue’s fork.

douggreen’s picture

I created MR https://git.drupalcode.org/project/extlink/-/merge_requests/18 so I'm removing the patch attachments from this, to avoid confusion.

douggreen’s picture

There is some overlap (and conflicts) with #3054538: A11y: add screen reader text for external links so I copied this commit from here to there. This can still be merged, if it goes first. Or if that MR goes first, this can be closed.

smustgrave’s picture

Status: Needs work » Postponed (maintainer needs more info)

Is this not a duplicate of #3378557: Fix Font Awesome markup and CSS ?

smustgrave’s picture

Status: Postponed (maintainer needs more info) » Closed (outdated)

If still valid for 2.0.x please reopen but going to close out for now.