Testing a CSS-only tooltip

What’s this about?

Can a simple tooltip be delivered without using JavaScript? This page shows two simple examples:

Example 1: using aria-label

Example 2: using aria-describedby

Find your account number on your recent utility bill

Some simple tests:

  1. Is the tooltip in close proximity?
  2. Is the tooltip persistent?
  3. Can the tooltip be accessed via keyboard only?
  4. Can the tooltip be closed via the ESC key? (if relevant)
  5. Will the tooltip close if the user clicks elsewhere?
  6. Will the tooltip close if focus moves?
  7. Is the tooltip announced when activated?

Important caveats:

  1. These examples are not intended for real production use. This is about exploring limits and trade-offs, not recommending a pattern.
  2. The content shown is deliberately simple. Anything complex should not be a tooltip.