====== 3. Write accessible links ======
The method of writing accessible links varies according to the type of link.
===== 3.1. Write explicit link text =====
The link text is the text of the hyperlink displayed on the screen. As far as possible, use clear and explicit link texts; that is link texts that can be understood when read without the text that surrounds it.
{{:notices:contributeurs:3-a-en.jpg?direct&400|}}
{{:notices:contributeurs:3-b-en.jpg?direct&400|}}
Links such as “Click here”, “More information” or “Read on” are therefore to be avoided for more informative links such as “Mr Cameron’s statement (read on)”, “Find out more about the Wiltshire contract”, or “Find out about our welcome offer”.
===== 3.2. Indicate the format, size, and (if required) language of each document that can be downloaded =====
Whenever links permitting the download of files are included in the content, the following information should be included in the link text:
* Document title.
* Document format.
* Size of document.
* Document language (if this is different from the main page language).
Normally, the publishing software automatically adds the size and format of files that are published. For internal documents, simply check the display of this information when content is published.
Delete the previous paragraph if the publishing software used adds the document format and size automatically to the link text when files are published.
{{:notices:contributeurs:3-c-en.jpg?direct|}}
For example, if a “Press catalogue” link points to a PDF file of 2.58 Kb, the link text should be optimised as “Press catalogue (PDF, 2.58 Kb)”.
{{:notices:contributeurs:3-d-en.jpg?direct|}}
A link to a “Rapport annuel” that points to a file of the same name should be optimised as “Rapport annuel (PDF, 6 Mb, in French)”.
===== 3.3. Indicate links that trigger the opening of a new window or tab =====
Sometimes when you click on a link, a new browser window is opened. For this type of link, a statement such as “(new window)” should be added to warn the user.
For example, if a “Rate this article” link triggers the opening of a new window, two approaches are possible:
- Change the link text to “Rate this article (new window)”.
- Keep the link “Rate this article” and add a link text “Rate this article (new window) to the tooltip ([[#know-when-to-use-link-titles-as-a-last-resort|see following recommendation]]).
It is possible that this statement or a pictogram is automatically added to links when contributors select the option to open a new window.
If so, you can delete this recommendation.
===== 3.4. Know when to use link titles as a last resort =====
When adding a link, it is possible to enter a link title by using an option designed for this purpose. This link title will take the form of a tooltip that will appear with a mouse-over of the link.
{{:notices:contributeurs:3-e-en.jpg?direct|}}
{{:notices:contributeurs:3-f-en.jpg?direct&400|}}\\
When creating a link in the publishing software, the user can enter the link title in the “Title” field in the “Insert/edit link” dialog box.
Specify in this insert the functionality(ies) used for entering link title.
You should limit these link titles to a strict minimum, as in some contexts the users cannot display or access them (touch screens, navigating from the keyboard, some screen readers, etc.). They are therefore to be used as a last resort, when it is not possible to make the link text completely explicit.
{{:notices:contributeurs:3-g-en.jpg?direct|}}\\
For example, in the case where a “Contact us” link triggers the opening of a new window, you could enter a link title such as “Contact us (new window)”.
**Warning**\\
If a link title is entered, it must imperatively include the same information as the link text while adding supplementary information. In other words:
* The link title must not just be a simple copy of the link text.
* The link title must not just contain supplementary information.
For example, a “News” link text with a link title “New window” or “News” is to be avoided. On the other hand, a “News” link text with a link title “News (new window)” is appropriate.