A11y: warn people when links open in new windows

Created on 16 April 2024, 2 months ago
Updated 30 April 2024, about 2 months ago

Problem/Motivation

Accessibility standards require that people are warned when a link will open a new window (since new windows can be hard to navigate and many people would prefer not to click the link if there is a chance they can't get back to the site).

This module offers the ability to force links to open in new windows, but when that option is selected, we should also add a warning.

Proposed resolution

When the option to force links to open in new windows IS NOT selected

<a href="https://bayareametro.zoom.us/j/85868739599" rel="nofollow noopener noreferrer" class="ext" data-extlink="">
   Attend on Zoom
  <span class="fa-ext extlink">
    <span class="fa fa-external-link"></span>
    <span class="sr-only">Link is external.</span>
  </span>
</a>

When the option to force links to open in new windows IS selected

<a href="https://bayareametro.zoom.us/j/85868739599" rel="nofollow noopener noreferrer" class="ext" data-extlink="" target="_blank">
   Attend on Zoom
  <span class="fa-ext extlink">
    <span class="fa fa-external-link"></span>
    <span class="sr-only">link is external, and opens a new window.</span>
  </span>
</a>
πŸ› Bug report
Status

Closed: duplicate

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States jenlampton

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

Comments & Activities

Production build 0.69.0 2024