Problem/Motivation
Drupal core (and contrib) currently makes heavy use of the HTML title attribute.
It's a problem because the title attribute isn't very accessible. Many groups of users cannot perceive content in a title attribute at all. The HTML5 recommendation includes a warning discouraging it's use.
It cannot be relied upon to convey information which is needed by all users, which means:
- Pretty much all information in Drupal's admin UI.
- Nearly all uses in website content. There are a handful of useful cases, such as a title attribute on an iframe.
At best, the title attribute can only be considered as bonus content for sighted users with a hover-capable pointer. 15 years ago, you could claim that group was a majority, but since touch-screen devices became ubiquitous that's no longer a reliable claim. However, using title attributes to convey important information can be a disservice to mouse users too; if there's anything important in the title attributes, users won't know about it unless they hover on the right control. You shouldn't have to go hovering over all the things just in case you're missing something.
Wordpress and Joomla have both been removing a lot of uses (and support for) the title attribute.
Proposed resolution
Vastly reduce the number of places where the HTML title attribute is used in Drupal core. Discourage developers from using it in
- In some cases we can just remove them wholesale.
- In other cases, we may need to tread more carefully and consider the impact on existing sites. A deprecation period may be justified.
- For example, some JS image lightbox overlay plugins use the title attribute on an
<img>
tag as the source for a visible caption. Some sites might be using the title attribute on image fields for this. A better practice nowadays is to use custom data-*
attributes, but much legacy code may be in use.
- Discourage the use of the title attribute in documentation and form descriptions. This is a way to address the author-guidance parts of ATAG (authoring tools accessibility guidelines).
- For example, add a warning to the Image Field type configuration form (and widget?) about accessibility problems with using the title attribute.
- Discourage use of the title attribute by developers, site builders, and authors. Look for handbook pages which can be updated.
Remaining tasks
Survey all places where we use the title attribute. For each one, assess it using the guide at Using the HTML title attribute.
Use child issues to remove title attributes which are not serving a good purpose.
TODO: how to organize this? It's a big survey!
User interface changes
Vastly reduce the number of places where the HTML title attribute is used in Drupal core.
API changes
Maybe? We might end up deprecating or removing some API methods/properties which support poor usage of the title attribute.
Background reading