NeovaPlataforma avançada de SEO

Tooltip ARIA sem nome acessível

Na Neova Roda a partir do próprio rastreamento: nada a configurar.

Regra revisada pela última vez em 17 de outubro de 2026 · Guia atualizado em 7 de julho de 2026

O WCAG 4.1.2 exige um nome em todo componente de interface do usuário. Uma tooltip sem nome não dá às pessoas que usam leitores de tela nada para ler.

O que você pode fazer

Adicione texto dentro da tooltip ou dê a ela um aria-label ou aria-labelledby.

Por que a Neova sinaliza isto

  • Um tooltip sem nome não dá nada para o leitor de tela ler quando aparece.
  • O WCAG 4.1.2 (nível A) exige um nome em todo componente da interface.
  • O tooltip costuma ter a única explicação do controle, e essa ajuda se perde.

Fontes

O guia completo

Esta parte está em inglês por enquanto.

This check flags any element carrying role="tooltip" that has no accessible name of its own. An empty-named tooltip is a container the browser advertises to assistive tech as “tooltip” with nothing inside it to read — so the very hint you built to help ends up announcing pure silence.

A Tooltip Is a Named Region, Not a Bare Wrapper

When you apply role="tooltip", you’re telling screen readers “this box holds a supplementary hint.” That promise only pays off if the box exposes text. If the tooltip’s content is injected as an icon, a background image, or gets emptied by a framework before it’s read, the role is left pointing at nothing. Worse, tooltips are often referenced from another control via aria-describedby — if the tooltip has no name, that description resolves to emptiness and the control it’s meant to explain gains nothing.

A Real Failing Pattern and the Fix

<!-- FAILING: tooltip role on an empty node, text lives in a pseudo-element -->
<span role="tooltip" class="tip" data-tip="Resets your password"></span>
<!-- .tip::after { content: attr(data-tip); }  <- invisible to AT -->

<!-- FAILING: trigger points at a tooltip that has no readable text -->
<button aria-describedby="tip1">?</button>
<div id="tip1" role="tooltip"><svg></svg></div>
<!-- FIXED: real text inside the tooltip, wired to its trigger -->
<button aria-describedby="tip1" aria-label="Password help">?</button>
<div id="tip1" role="tooltip">Resets your password to a temporary one.</div>

The fix does two jobs: it puts real, selectable text inside the role="tooltip" element (so its accessible name is that text), and it names the trigger button too, since a lone “?” is meaningless on its own. Now hovering or focusing the button both reads the button’s purpose and exposes the hint.

Where Tooltip Text Can Go Missing

Source of the “Text” Visible to Sighted Users? Exposed as Accessible Name?
Real text nodes inside the element Yes Yes — correct
CSS ::before/::after content Yes No — generated content is ignored
Background-image icon only Yes No
Text injected by JS after render Sometimes Only if present when AT reads it
data-* attribute rendered via CSS Yes No

How to Detect It on Your Own Site

  1. axe DevTools: run a scan and look for “aria-tooltip-name”. It flags every role="tooltip" element whose accessible name computes to empty, with the exact selector.
  2. Lighthouse: the Accessibility category reports “ARIA tooltip elements do not have accessible names” when a named tooltip is missing readable content.
  3. WAVE: run the extension and check the Details panel for the tooltip role; if no associated text shows, or you see an empty-element alert, the name is missing.
  4. Manual inspector check: select the tooltip node in the browser Accessibility pane and read its computed “Name.” Blank means it fails — and anything the trigger’s aria-describedby points to will resolve empty too.

How to Fix It

  1. Put the hint as real text directly inside the role="tooltip" element. Not a pseudo-element, not a background image, not a bare data- attribute — actual text the DOM contains.
  2. Ensure the tooltip content exists in the DOM when assistive tech reads it. If your library injects text only on hover, confirm it’s also present on keyboard focus and stays long enough to be announced.
  3. Wire the tooltip to its trigger with aria-describedby pointing at the tooltip’s id, so the hint is announced as a description of the control.
  4. Give the trigger its own accessible name too — an icon-only “?” button needs aria-label so it isn’t announced as just “button.”
  5. Re-scan; aria-tooltip-name should return zero violations.

Why an Empty Tooltip Is Worse Than None

Skip the tooltip entirely and a screen-reader user simply doesn’t get the hint — no harm, just no help. Ship a named-but-empty tooltip and you actively mislead: assistive tech announces “tooltip,” the user expects information, and gets dead air. On complex forms where tooltips explain password rules, tax fields, or shipping caveats, that silence is the difference between finishing the form and bailing on it. And because tooltips are frequently the payload of an aria-describedby relationship, an empty one quietly guts the description of the control it was supposed to support. The same naming discipline governs ARIA toggle fields and other unnamed widgets.

FAQ

Can I Use the title Attribute Instead of role="tooltip"?

For a plain text hint, native title is often simpler and needs no ARIA — but it’s invisible on touch devices and unreliable for keyboard users. If you build a real tooltip widget, use role="tooltip" with genuine text and wire it up properly.

Does the Tooltip Need to Be Focusable?

The tooltip itself usually shouldn’t be a tab stop — the trigger is. The tooltip appears on the trigger’s hover/focus and is announced via aria-describedby. Making the tooltip a focus target on its own tends to trap keyboard users.

Why Doesn’t My CSS-Generated Tooltip Text Count?

Content produced by ::before/::after or by rendering a data- attribute lives in the render tree, not the DOM, so the accessibility-name algorithm can’t see it. Only real DOM text (or an ARIA name) is exposed.

Is role="tooltip" Even Required?

Not always. Many robust tooltips work with just aria-describedby pointing at a plain <div> of text. But once you’ve declared role="tooltip", this check holds you to giving it a name.

What About Tooltips That Show on Click, Not Hover?

Same rule — the trigger controls visibility, the tooltip holds real text, and aria-describedby (or aria-labelledby if it names rather than describes) exposes it. Click-triggered hints should also be dismissible with Escape. Pair this with a correct base role for the trigger element.

Encontre isso no seu próprio site

O Neova roda esta verificação e todas as outras em cada rastreamento e depois escreve a correção como um ticket para a sua equipe.

  • App para desktop no Mac, Windows e Linux
  • Todas as 696 verificações, cada uma com sua fonte
  • Search Console e Analytics 4, conectados só para leitura
  • Tickets para Jira, Linear e Asana

Baixar a Neova Plano Desktop Free, ou Solo grátis por 14 dias, sem cartão.

Todas as verificações da categoria Acessibilidade · Guias · Biblioteca de verificações

Escrito pela Neova Labs · Voltar à Biblioteca de verificações