Attribution links open new windows without informing user

Created on 8 March 2024, 10 months ago
Updated 25 March 2024, 9 months ago

Problem/Motivation

Attribution links sometimes have target="_blank" set to open in new window, but user is not informed of this change.
This will be disorientating for certain users as it hijacks their browsing expectations.

Failure of WCAG Success Criterion 3.2.5 due to opening windows that are not requested by the user.

Steps to reproduce

Go to any content with a map provided by leaflet module using default Leaflet (or Stamen TonerLite) layers, in bottom right of map click on OpenStreetMap (or Stadia Maps) link.
Opens destination link in new window, unable to use back button to return to previous page.

Proposed resolution

Considering the negative impact of using target="_blank", and it's inconsistent use, recommend remove any use of target="_blank" altogether.

Remaining tasks

Remove target="_blank" from any links, unless essential to not disrupt user's current activity, in which case provide text informing the user of this change of context.
See https://www.w3.org/WAI/WCAG21/Techniques/general/G200

🐛 Bug report
Status

Fixed

Version

10.2

Component

Code

Created by

🇫🇷France waako Normandie

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

  • Issue created by @waako
  • Merge request !36Remove any of use of target="_blank" → (Merged) created by waako
  • Status changed to Needs review 10 months ago
  • 🇫🇷France waako Normandie
  • First commit to issue fork.
  • Pipeline finished with Skipped
    10 months ago
    #115875
  • Status changed to Fixed 10 months ago
  • 🇮🇹Italy itamair

    Thanks for reporting this @waako ...
    This doesn't look a big deal to me (but rather a kind of picky one), also because this doesn't happen on a general basis,
    but ok ... it makes some sense to me, and I agree to merge your MR.
    This will be part of the next Leaflet module release.

  • Status changed to Needs review 10 months ago
  • 🇫🇷France waako Normandie

    Thanks @itamair
    Really appreciate the quick approval and merge!

    I do understand that it may not seem like a big deal to most people, but for users with disabilities such as cognitive or motor impairments, this can be very disorientating and make it challenging to navigate back.
    Plus as you say, "it doesn't happen on a general basis", so may well keep it consistent with not opening links in new windows unexpectedly, none of us like our clicks to be hikacked :)

    For background context, leaflet is the default mapping provider for https://localgovdrupal.org/ and this was causing accessibility errors for many local authority websites, so they were keen to get this resolved.

    Thanks again.

  • Status changed to Fixed 10 months ago
  • 🇫🇷France waako Normandie

    Sorry, missed the status change

  • 🇩🇰Denmark ressa Copenhagen

    Thanks @waako and @itamair, I agree with removing target="_blank" and have just updated 📌 Stamen map tiles moving to Stadia hosting and will no longer be available at old URL Needs review to follow this practice as well in that MR.

  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024