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. It must not be used for important information, which pretty much means all information in Drupal's admin UI.
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.
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. A better practice nowadays is to use customdata-*
attributes, but much legacy code may be in use.
- For example, some JS image lightbox overlay plugins use the title attribute on an
- 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
- Using the HTML title attribute – Updated Dec 2012. A few years old, but still highly relevant. This serves as a very useful guide to how to assess existing uses of the title attribute.
- HTML5 Accessibility Chops: title attribute use and abuse
- The Trials and Tribulations of the Title Attribute
- The Title Attribute and Why It’s Almost Useless
- How to Restore the Link Title Attribute Removed in WordPress 4.2. Includes the background story from when WordPress removed support for the title attribute on links.
- Tenon Research first glimpse: The best & worst of content management systems. This article specifically criticizes us for using unnecessary title attributes: "WordPress used to be rather well-known for putting unnecessary title attributes everywhere (Drupal still does)."