Asqatasun v4 - Summary

Asqatasun v4 - RGAA 3.2016 - Rule 13.6.2

Summary

This test consists in detecting each downloadable file on the page.

Business description

Criterion

13.6

Test

13.6.2

Description

Dans chaque page Web, chaque fichier en téléchargement via un lien ou un formulaire a-t-il des informations relatives à son poids (hors cas particuliers) ?

Level

A

Technical description

Scope

Page

Decision level

Semi-Decidable

Algorithm

Selection

Set1

All the <a> tags with an "href" attribute (a[href])

Set2

All the elements from Set1 with an "href" attribute that does not contain a fragment (presence of the hash sign (#))

Set3

All the elements from Set2 that have a proper extension (no parameters, a path after the domain that contains a "." character)

Set4

All the <form> tags (form)

Process

Test1

For each element of Set3, we check whether the content of the "href" attribute of the link ends with an extension that belongs to the downloadable document extension list

For each element returning true in Test1, raise a MessageA

Test2

If Test1 returns false, we check whether the size of Set2 is equals to size of Set3. In other words, we verify that all the links of the page have a well-defined extension.

If Test2 returns false (some links have no extension on the page), raise a MessageB.

Test3

If Test2 returns true (all the links have a well-defined extension that belongs to the web content extension list), we check whether Set4 is empty (the page contains forms that may lead to a downloadable document).

If Test3 returns false (some form are found on the page), raise a MessageC.

MessageA : File To Download Detected, check weight
MessageB : Check manually links without extension
MessageC : Check downloadable document from form

Analysis

 Not Applicable

Pre-Qualified

In all other cases

Notes

We assume that a targetted document (pointed by the "href" attribute of the link) can be characterized by its extension.

Here is the content of the downloadable document extension list (feel free to help us improving it or to criticise it) :

TestCases

TestCases files for rule 13.6.2