6.1.1. Write meaningful texts for links and buttons

Make sure that link and button texts are as meaningful as possible. In other words, the function of the link or button must be completely understood just by reading the text.

This text corresponds to the text contained:

  • Between the <a> and </a> tags.
  • Between the <button> and </button> tags.
  • In the alt attribute for <input type=“image” />.
  • In the value attribute for <input type=“button” /> or <input type=“submit” />.

So, rather than “OK” buttons or “Back” links, it is better to use:

<input type="submit" value="Register" />
 
<a href="basket.html">Return to step 1: "Your basket"</a>

Tip

To write meaningful texts, you have to imagine that link or button texts are extracted from the page and read without context. Do they remain understandable? Do they give an idea of the content of the target page or the action that will be carried out?

Note

When text and images are shown together in the link or button text, the alternate text of the image should be considered as being an integral part of the text.

The following link will therefore be considered as meaningful:

<a href="/latest-changes/">
    <img src="images/warning-pictogram.png" alt="Warning: " title="Warning!" />
    Make sure you take into account the latest changes to Canelis before use.
</a>

Warning

Links and buttons must never be empty and must always have a text.

notices/html-css/privilegier-au-maximum-les-intitules-explicites-pour-les-liens-et-les-boutons.txt · Last modified: 30 December 2013 at 17:57 by Sébastien Delorme (Atalan)
 

Project coordinated by Atalan.

In partnership with:

Observers: