liveBook · Manning

Title attribute

As explained in Architecting Accessibility

The title attribute is an HTML global attribute that provides advisory text associated with an element.

An `abbr` element can put an abbreviation’s expansion in `title`, which some browsers show as a tooltip. Because keyboard, touch, voice interaction, and limited fine motor control can make hovering inaccessible, include the expansion in surrounding text too. section 4.1

<section aria-labelledby="messaging-service"> #A
  <h2 id="messaging-service">Messaging service</h2> #B
  <p> #C
    We provide an Application Programming Interface #D
    (<abbr title="Application Programming Interface">API</abbr>) #D
    that enables applications to send and receive messages.
  </p>
  <p>
    The API's <dfn id="dfn-latency">latency</dfn> - the time between a #E
    request and message processing - is typically under 200 milliseconds.
  </p>
  <p>
    This <a href="#dfn-latency">latency</a> is not guaranteed, #E
    especially during periods of high traffic.
  </p>
</section>

This example gives API’s expansion in visible text and in the `title` attribute. section 4.1

How Architecting Accessibility covers it

How deep it goes
Describes possible tooltip display and warns that hover access is unreliable.
Examples
Shows title="Application Programming Interface" on API and recommends spelling out the expansion in surrounding text.
What you can do after
Apply abbreviation expansions in surrounding text rather than relying on hover-only title tooltips.
How it connects
Connects the title attribute with the HTML abbr element, tooltips, and assistive-technology access.

Also explained in

Compare how 2 books explain title attribute →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Architecting Accessibility. The section links point to the parts of the book it draws on.