Rule 13.3.1
Summary
This test consists in detecting each downloadable file on the page.
Business description
Criterion
Test
Description
Dans chaque page web, chaque fonctionnalité de téléchargement d’un document bureautique vérifie-t-elle une de ces conditions?
- Le document en téléchargement est compatible avec l’accessibilité ;
- Il en existe une version alternative en téléchargement compatible avec l’accessibilité ;
- Il en existe une version alternative au format HTML compatible avec l’accessibilité.
Cas particuliers (13.3)
Il existe une gestion de cas particuliers
- Pour les personnes de droit privé mentionnées aux 2° à 4° du I de l’article 47 de la loi du 11 février 2005 si les fichiers bureautiques (ex PDF, documents Microsoft ou LibreOffice, etc.) ont été publiés avant le 23 septembre 2018 (sauf si ce sont des documents nécessaires pour accomplir une démarche administrative relevant des tâches effectuées par l’organisme concerné), ils sont exemptés de l’obligation d’accessibilité. Dans cette situation, le critère est non applicable.
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
office document extension list. (see: OfficeDocumentExtensions
momenclature)
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), 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: Office Document Detected
- code: OfficeDocumentDetected
- status: Pre-Qualified
- parameter: href attribute, snippet
- present in source yes
MessageB Check manually links without extension
- code: CheckManuallyLinkWithoutExtension_Rgaa40-13-3-1
- status: Pre-Qualified
- present in source: no
MessageC: Check downloadable document from form
- code: CheckDownloadableDocumentFromForm_Rgaa40-13-3-1
- status: Pre-Qualified
- present in source: no
Analysis
Not Applicable
- The page has no link that are not anchor (Set2 is empty)
- All the links of the page have a well-defined extension AND all the extension are not of office document type AND the page has no form (Test3 returns true)
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 office document extension list (feel free to help us improving it or to criticise it):
- ods
- fods
- odt
- fodt
- odp
- fodp
- odg
- fodg
- doc
- docx
- docm
- dot
- dotm
- xls
- xlsx
- xlsm
- xlt
- xltx
- xltm
- xlc
- xlr
- xlam
- csv
- ppt
- pptx
- pps
- vsd
- vst
- vss
- sxc
- sxd
- sxi
- sxm
- sxw
- sda
- sdc
- sdd
- sdf
- sdp
- sds
- sdw
- otf
- otg
- oth
- ots
- ott