Accessible tooltips in WordPress
Tooltips in four positions that open on hover, tap and keyboard focus, and close with Escape, as WCAG requires.
Here is an excerpt of this component's code in WordPress. The full code is free for members, ready to copy into your project.
This component also comes in
The code in WordPress
<?php
/**
* Plugin Name: Forge, Info-bulles accessibles
* Description: Des info-bulles en quatre positions qui s’ouvrent au survol, au toucher et au clavier, et se referment avec Échap, comme le demandent les WCAG. Ajoute la composition « Info-bulles accessibles » à l'éditeur de blocs.
* Version: 1.0.0
* Requires at least: 6.6
* Requires PHP: 8.1
* Author: Forge
* License: GPL-2.0-or-later
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
* Text Domain: forge-info-bulle-accessible
*<!-- wp:html -->
<p class="ibl-hint">Survolez, touchez ou atteignez avec Tab les termes soulignés. La touche <kbd>Échap</kbd> referme l’info-bulle.</p>
<!-- /wp:html -->
<!-- wp:group {"tagName": "article", "className": "ibl-card", "layout": {"type": "default"}} -->
<article class="wp-block-group ibl-card"><!-- wp:group {"tagName": "header", "className": "ibl-head", "layout": {"type": "default"}} -->
<header class="wp-block-group ibl-head"><!-- wp:paragraph {"className": "ibl-eyebrow"} -->
<p class="ibl-eyebrow">Devis n° 2026-118 · valable jusqu’au 27 novembre 2026</p>
<!-- /wp:paragraph -->
<!-- wp:heading {"level": 2, "className": "ibl-title", "anchor": "ibl-titre"} -->
<h2 class="wp-block-heading ibl-title" id="ibl-titre">Rénovation de la salle de bains</h2>
<!-- /wp:heading -->(() => {
if (!document.querySelector(".ibl-hint")) return;
// Escape hides the bubble without moving focus or the pointer; it comes back on the next hover or focus.
const iblTips = [...document.querySelectorAll("[data-ibl]")];
const iblReset = (tip) => tip.removeAttribute("data-ibl-dismissed");
iblTips.forEach((tip) => {
const trigger = tip.querySelector("button");
// A tap does not always focus a button (Safari): the click opens the bubble too.
trigger.addEventListener("click", () => {
iblReset(tip);
tip.setAttribute("data-ibl-open", "");:root {
--ibl-card-bg: #ffffff;
--ibl-text: #1c2a39;
--ibl-muted: #4b5563;
--ibl-line: #e2e8f0;
--ibl-total-bg: #f0fdfa;
--ibl-accent: #0f766e;
--ibl-focus: #0f766e;
--ibl-tip-bg: #1e293b;
--ibl-tip-text: #f8fafc;
--ibl-tip-shadow: 0 10px 24px rgb(15 23 42 / 0.22);
--ibl-kbd-bg: #ffffff;Free component: copy it freely, including for commercial projects.
Other breadcrumbs and pagination components in WordPress
Breadcrumbs and pagination components in WordPress
A bottom bar with Call, Directions and Free quote that tucks away while visitors read down the page and returns as soon as they scroll up. Built for tradespeople whose customers arrive on a phone.
- Tailwind
- React
- CSS
- WordPress

A slim bar at the top of the page with a message, a link and a close button; once closed, it stays hidden for the period you choose.
- Tailwind
- React
- CSS
- WordPress

A sticky sidebar table of contents for blog posts: it highlights the section being read, shows the reading time left and folds into a list under the title on mobile.
- Tailwind
- React
- CSS
- WordPress

A column of dots on the side of the page that follows the section being read and lets visitors jump to it, with a label on hover and focus.
- Tailwind
- React
- CSS
- WordPress

Step indicator
FreeAn order step indicator: finished steps clickable to go back, the current step announced, upcoming steps locked.
- Tailwind
- React
- CSS
- WordPress

Quick access links that appear on the first Tab press to skip the header and menu, as required by the RGAA and WCAG.
- Tailwind
- React
- CSS
- WordPress