In short
Information that only appears when the mouse passes over it is invisible on a touchscreen, out of reach from the keyboard and often ignored by screen readers. The task is to find this content (tooltips, submenus, product details, action buttons on cards, definitions) and make it visible from the start or reachable by click, touch and keyboard focus. Once it is done, no useful information depends on the mouse alone.
Why it matters
Hover only exists with a fine pointer. On a smartphone, the first tap sometimes triggers a pseudo-hover and sometimes follows the link directly: the behavior varies with the browser and the code. With the keyboard, nothing happens if the content is only tied to :hover or to mouseover. The title attribute, the most widespread case, shows its tooltip neither on keyboard focus nor on touch, and screen readers do not read it consistently.
Bots do not hover either. Google says so in its mobile-first indexing documentation: it does not load content that requires user interaction, such as swiping, clicking or typing. There are two cases:
- the text is already in the HTML and only hidden by CSS until hover: it is in the rendered HTML and can be indexed;
- the text is loaded by JavaScript on hover (request triggered by
mouseenter): it does not exist for Google, nor for the crawlers of generative engines, most of which do not execute JavaScript.
WCAG success criterion 1.4.13 “Content on Hover or Focus” (level AA) also governs content that appears on hover: it must be dismissible without moving the mouse (Esc key), stay displayed when the pointer moves over it, and not disappear on its own. Native tooltips from the title attribute, controlled by the browser, fall outside the scope of this criterion, which does not make them accessible for all that.
What it improves
- Mobile and conversion Prices, shipping costs, available sizes or the conditions of an offer become readable on smartphones, where a large share of traffic happens.
- Accessibility WCAG success criteria 1.4.13 and 2.1.1 “Keyboard”.
- Indexing Content present in the HTML, rather than loaded on hover, can be indexed by Google and read by AI crawlers.
- AI citations A detail that is visible and present in the code (definition, condition, figure) can be picked up; a tooltip loaded on hover will not be. No guarantee of citation.
- Rankings No direct effect, other than the indexing of text that was not indexed before.
How to check
Keyboard and touch inventory. Go through the main templates (home, category, product page, article, checkout funnel):
- with the keyboard only, using Tab, Enter and Esc: every submenu, tooltip or detail must open on focus or activation, and close with Esc;
- on a real smartphone, or in the mobile emulation of the developer tools: every piece of information must be reachable with a tap;
- hover over each tooltip, then move the mouse onto its content: it must not disappear.
Search the code for title attributes and hover effects.
grep -rn -E '\stitle="[^"]+"' --include=*.{html,php,twig,liquid,tsx,jsx,vue} . | grep -v -E '<(title|iframe|abbr)'
grep -rn -E ':hover|group-hover:|mouseenter|mouseover' --include=*.{css,scss,js,ts,tsx,jsx,vue} . | grep -v -E 'focus'
The second command lists hover rules that have no focus equivalent on the same line: check them one by one.
Content loaded on hover. Open the Network tab of the developer tools and hover over menus and cards: a request sent at that moment reveals content missing from the HTML. Compare with the raw HTML:
curl -s https://example.com/categorie | grep -c "Free delivery from"
0 for a text shown on hover: it is not in the initial code.
How to implement
Before you start
For each piece of hover content, decide:
| Content | Decision |
|---|---|
| Necessary information (price, costs, availability, condition, input error) | Display it permanently, without hover |
| Useful extra (definition, field help, detail of a feature) | Button that opens a panel, or <details> |
| Navigation submenu | Opens on click and from the keyboard, links present in the HTML |
| Action on a card (add to cart, favorite) | Button always visible, or at least visible on focus |
| Decorative effect (second photo, zoom, shadow) | Hover is acceptable |
Native collapsible block, accessible by keyboard, by touch and to bots (the text is in the HTML):
<details>
<summary>Delivery times and costs</summary>
<p>Free delivery from €50. Shipped within 24 business hours, delivered in 2 to 4 days in mainland France.</p>
</details>
Help tooltip that meets success criterion 1.4.13: opens on click, tap or keyboard, closes with Esc or a second click.
<span class="aide">
<button type="button" class="aide__bouton" aria-expanded="false" aria-controls="aide-tva">
<span aria-hidden="true">?</span>
<span class="visually-hidden">How is VAT calculated?</span>
</button>
<span id="aide-tva" class="aide__bulle" role="note" hidden>
VAT is calculated based on the delivery country entered at the next step.
</span>
</span>
<script>
document.querySelectorAll('.aide__bouton').forEach((bouton) => {
const bulle = document.getElementById(bouton.getAttribute('aria-controls'));
const basculer = (ouvrir) => {
bouton.setAttribute('aria-expanded', String(ouvrir));
bulle.hidden = !ouvrir;
};
bouton.addEventListener('click', () => basculer(bulle.hidden));
document.addEventListener('keydown', (e) => {
if (e.key === 'Escape' && !bulle.hidden) {
basculer(false);
bouton.focus();
}
});
});
</script>
The HTML popover attribute, supported by current browsers, also opens on click and closes with Esc or a click outside, with no script: <button popovertarget="aide-tva"> and <div id="aide-tva" popover>.
In the CSS, pair every useful hover with a focus state, and reserve hover effects for devices that have hover:
.carte__actions {
opacity: 1;
}
@media (hover: hover) and (pointer: fine) {
.carte__actions {
opacity: 0;
}
.carte:hover .carte__actions,
.carte:focus-within .carte__actions {
opacity: 1;
}
}
.menu__item:hover > .sous-menu,
.menu__item:focus-within > .sous-menu {
display: block;
}
Finally, replace title attributes that carry information: visible text, a caption or a help button. For an abbreviation, write out the long form on first use rather than relying on <abbr title>.
WordPress
Versions WordPress 6.4 and later, WooCommerce 9 and later.
- Navigation block: in the block settings, turn on “Open on click” for submenus. Submenus then open on tap and from the keyboard, with
aria-expandedhandled by the block. - Plugin mega menus: choose the click trigger, and check in the source HTML that submenu links are present without hover, not loaded via AJAX.
- WooCommerce: some themes only show the add-to-cart button, variants or the shipping badge when hovering over the thumbnail. Look for an “always visible” option in the theme Customizer, or add the CSS rule above in
Appearance > Customize > Additional CSS(or the Site Editor styles). - Plugin glossaries and tooltips: check that they open on click and from the keyboard; otherwise, replace them with a Details block, available in the editor.
Shopify
Versions Online Store 2.0 themes (Horizon, Dawn), all Shopify plans, November 2026.
The product card option that shows a second image on hover is decorative and can stay. Check, however, the quick add buttons, color swatches and shipping information that only appear on hover: in Dawn and the themes derived from it, they are in snippets/card-product.liquid; in Horizon and other themes, look for the product card block or snippet in the code editor. For a shipping or returns detail on the product page, use the collapsible block of the product section (“Collapsible row” in Dawn), which is built on <details>. Tooltip or size chart apps must open on tap: test them on a smartphone.
Laravel
Versions Laravel 11 to 13, Alpine.js 3, Tailwind CSS 3 and 4.
Blade help component with Alpine.js, opened on click, closed with Esc or a click outside, in resources/views/components/aide.blade.php:
@props(['id', 'question'])
<span x-data="{ open: false }" x-on:keydown.escape.window="open = false" x-on:click.outside="open = false" class="aide">
<button type="button" x-on:click="open = ! open" x-bind:aria-expanded="open.toString()" aria-controls="{{ $id }}">
<span aria-hidden="true">?</span>
<span class="visually-hidden">{{ $question }}</span>
</button>
<span id="{{ $id }}" role="note" x-show="open" x-cloak>
{{ $slot }}
</span>
</span>
Usage: <x-aide id="aide-tva" question="How is VAT calculated?">VAT is calculated based on the delivery country.</x-aide>. Blade renders the text in the HTML, so bots can read it even when it is closed. With Tailwind, every useful group-hover: must have its group-focus-within:. Tailwind 4 already applies the hover: variant only on devices that support hover: on mobile, the element keeps its default state, which must therefore be the visible state.
Next.js
Versions Next.js 15 and 16 (App Router).
Tooltip libraries (Radix UI Tooltip, shadcn/ui components, Headless UI) handle the keyboard and Esc, but a tooltip generally does not open on tap. Only put extra information in one; for information that must be readable on mobile, use a Popover or a <details>.
export function DetailsLivraison() {
return (
<details>
<summary>Delivery times and costs</summary>
<p>Free delivery from €50. Shipped within 24 business hours.</p>
</details>
);
}
Render this component on the server so that the text is in the initial HTML. Do not run a fetch on onMouseEnter to retrieve content you want indexed or cited: preload it at render time. The same principles apply to Nuxt (<details>, @focus alongside @mouseenter).
Common mistakes
- Putting the final price, costs or a condition in a
titleattribute: invisible on mobile and from the keyboard. - Submenus opened only on
:hover: navigation is impossible from the keyboard and hit-or-miss on touch. See optimize mobile menus (opens in a new tab). - Tooltip that disappears when you hover over it: the bubble is placed away from its trigger, and the pointer loses it on the way.
- Add-to-cart button visible only when hovering over the card: on mobile, users have to open the product page; with the keyboard, they tab to an invisible button.
- Content fetched via AJAX on hover: it exists neither for Google nor for AI crawlers.
- Icons without text whose meaning only appears on hover: give them a visible label or at least an accessible name.
- Believing that content hidden until hover is hidden from Google: if it is in the rendered HTML, it can be indexed. Never use it to show bots different text from what visitors see.
Frequently asked questions
Does Google index content shown on mouse hover?
It depends on where it comes from. If the text is already in the HTML and only hidden by CSS until hover, it is in the rendered HTML and Google can index it. If it is loaded by JavaScript at the moment of hover, Google does not see it: its documentation states that it does not load content that requires user interaction. AI crawlers, which often do not execute JavaScript, do not see it either.
Is the title attribute accessible?
The title attribute is not a good way to convey information. Its tooltip only appears on mouse hover, not with the keyboard or on touch, and screen readers do not read it consistently. Keep it for the title of an iframe, where it serves as the accessible name, and elsewhere replace it with visible text, a caption or a help button that opens a panel.
What does WCAG success criterion 1.4.13 require for hover content?
Success criterion 1.4.13, at level AA, applies to content that appears on hover or focus, such as custom tooltips and submenus. It must be dismissible without moving the mouse or the focus, for example with the Esc key, stay displayed when the pointer moves over it, and only disappear if the user moves away, dismisses it or the information is no longer valid.
Resources
- W3C: Understanding Success Criterion 1.4.13, Content on Hover or Focusw3.org
- MDN: the title attribute and its accessibility limitsdeveloper.mozilla.org
- MDN: the details elementdeveloper.mozilla.org
- MDN: the popover attributedeveloper.mozilla.org
- Google Search Central: Mobile-first indexing best practicesdevelopers.google.com
- W3C: Disclosure pattern in the ARIA guidew3.org
Updated on
Topic checklist (PDF)