WebAIM - Web Accessibility In Mind

E-mail List Archives

Using title on buttons containing icon fonts to provide the accessible name

for

From: Detlev Fischer (TK)
Date: Feb 20, 2018 2:33AM


Hi,

the question has come up if the use fo title to provide the accessible
name for visual controls that do not use img and therefore cannot use
the alt attribute is an acceptable practice (in terms of WCAG
conformance, but also in terms of just 'good practice').

I am aware of the arguments against using title (see
https://developer.paciellogroup.com/blog/2013/01/using-the-html-title-attribute-updated/
), noting that this comprehensive article is now 4 years old and things
might have changed in terms of screen reader support.

In the cases we are discussing, it seems that clients insist on the use
of just an icon for certain quite conventional visual controls (like the
top right [x] close button of a modal). The better choice in terms of
accessibility might be adding a text label, but I would argue that the
x-for-closing convention for visual users is well established and would
be acceptable (especially if ESC for closing is also implemented).

So if a button containing a icon font (hidden for screen readers with
aria-hidden) is given an accessible name via title, is there really any
good reason to recommend aria-label or accessibly-hidden text (or some
other solution using img and alt) instead? It seem sthat the only
practical difference for non-visual users would be that they are now
deprived of the (weak and badly supported) cue of a visual tooltip
rendered by some browsers on mouse hover.

I would be very interested if there are non-visual use cases of such
buttons where the accessible name provided via title will not be exposed
(in some browser / screen reader combo, or in mobile OS browsers). (I am
not talking about the case of a control using img with alt="" where
title may not be exposed.) If such cases exist, that would be sufficient
ammunition to advise against the use of title in the cases decribed.

Best,

Detlev


--
---------------------------------------------------------------
Detlev Fischer PhD
Testkreis
http://testkreis.de

Telefon: +49-40-43 18 75-25
Mobile: +49-157 57 57 57 45
Fax: +49-40-43 18 75-45
E-Mail: <EMAIL REMOVED>

Anschrift: Werderstr. 34, 20166 Hamburg
Amtsgericht Hamburg HRB 58 167
---------------------------------------------------------------