Skip to content
EUID Audit service & seal, Home
Get your website audited

This translation has not been editorially reviewed yet. The German version is authoritative. Deutsche Fassung

Accessibility

Is the title attribute sufficient as a tooltip?

For a hint that visitors really need, the title attribute is not enough. It is an additional field in the HTML, the text of which shows the browser as a small bubble when running over with the mouse. Anyone who uses the keyboard or taps on the mobile phone often does not see this bubble. The note therefore belongs as visible text on the page or behind a button that opens it.

The HTML standard itself advises against this

The HTML standard warns that you should not currently rely on the title attribute, because many browsers do not offer it accessible. Often, the bubble needs a pointing device like a mouse, and this excludes everyone who uses only the keyboard or only a touchscreen, i.e. anyone with a current phone or tablet. The developer documentation MDN mentions other affected persons: people with a read-out program or screen magnifying glass, with limited fine motor skills or with cognitive limitations.

WCAG 1.4.13 takes it out, the keyboard rule remains

The criterion 1.4.13 on insertions explicitly does not apply to browser tooltips because the browser controls their presentation. The W3C gives the title attribute as an example. An examination under this rule alone does not report it. However, the same explanation says: What appears when passing over with the pointer should also appear via the keyboard focus, and refers to the criterion 2.1.1 keyboard. For the customer only counts anyway, whether he gets the hint to see.

The replacement depends on the place

The easiest is visible text directly on the field, connected to the field via aria-describedby. The expert author Heydon Pickering recommends a clearly formulated, permanently visible label. If the space is scarce, a small button that opens the hint by click helps. Pickering calls the toggletip: It works with mouse, keyboard and touch and closes with Escape, when leaving the focus or with a click next to it. The trigger must be a real button element for the keyboard to reach it.

Own bubbles fall under the rule for overlays

If you want the bubble to appear when you run over, build your own tooltip, and thus 1.4.13 applies in full. The W3C technique SCR39 names the samples: The pointer can be moved to the bubble, the bubble does not close by itself after a time, and Escape closes it without the pointer or focus traveling. The focus remains on the trigger. If the bubble contains links or other controls, a non-modal dialogue fits better after the W3C pattern. According to the site, this pattern is still in the works.

Where the attribute has its place

On the iframe, the frame for embedded cards or videos, the title attribute labels the frame so that visitors can decide if they want to enter; For this, there is the W3C technology H64. According to the HTML standard, it may contain additional information on the image, the alternative text remains unaffected. On the link, the W3C technique advises H33 to be careful and prefers a complete link text. A warning always belongs there in the link text.

Examples

Input field note

Not met
<label for="knr">Kundennummer</label>
<input id="knr" title="Steht oben rechts auf der Rechnung">
Passes
<label for="knr">Kundennummer</label>
<input id="knr" aria-describedby="knr-hilfe">
<p id="knr-hilfe">Steht oben rechts auf der Rechnung.</p>

The text is visible to everyone under the field and is connected to it via aria-describedby.

More on this topic

Deutsche Fassung dieser Seite

  • Seal Digitale Barrierefreiheit
  • Seal Daten & Recht
  • Seal Technische Qualität
  • Seal Digital Excellence
  • Seal Cyberversicherung

Audited. For a better digital future.euid.com

Is the title attribute sufficient as a tooltip? · euid.com