RGAA 3.2016 - Rule 13.2.1

Summary

This test consists in detecting links that are opened in a new window.

The control that checks that the user is warned has to be done manually.

Business description

Criterion

13.2

Test

13.2.1

Description

Dans chaque page Web, pour chaque ouverture d’une nouvelle fenêtre effectuée via un lien (attribut target) ou une commande JavaScript, l’utilisateur est-il averti ?

Level

A

Technical description

Scope

Page

Decision level

Semi-Decidable

Algorithm

Selection

Set1

All the <a> tags with an href attribute AND a not empty target attribute with a content different from _self, _top and _parent.

a[href][target]:not([target=_self]):not([target=_top]):not([target=_parent]):not([target~=^\s*$])

Process

Test1

If Set1 is not empty, raise a MessageA for each occurence.

Raise a MessageB instead.

MessageA : Check user is warned when a new window is opened
  • code : CheckUserIsWarnedWhenNewWindowOpen
  • status: Pre-Qualified
  • parameter : text, title attribute, snippet
  • present in source : yes
MessageB : Check whether js prompt eventually a new window
  • code : CheckJavaScriptPromptANewWindow
  • status: Pre-Qualified
  • present in source : no

Analysis

Pre-Qualified

In all cases

Notes

We assume here that a not empty value different from "_self" for the "target" attribute lead to the opening of the page in a new window. The detection is not only done with the "_target" value.

On latest webdev data set (2013-10-30, 78,000 pages), the selection has been found on 62039 pages, i.e on 79% of the pages

TestCases

TestCases files for rule 13.2.1