a11ypros

Accessible Tooltip

Buttons 1

About

A WCAG-compliant tooltip that shows contextual help text on hover or keyboard focus, with ARIA aria-describedby wiring, Escape-to-dismiss, hoverable persistence, and automatic edge-clamping. Ported from A11YPros' accessible a11y-tooltip web component (MIT licensed).

Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Accessible Tooltip to your project and fits it to your theme.

Code

How Accessible Tooltip is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

import Tooltip from "@/components/ui/a11y-tooltip";

export default function TooltipDemo() {
  return (
    <div
      style={{
        display: "flex",
        justifyContent: "center",
        alignItems: "center",
        minHeight: "260px",
        padding: "5rem",
      }}
    >
      <Tooltip
        placement="top"
        defaultIcon="help"
        label="Help: Password format"
        content="Passwords must be at least 12 characters and contain a number and symbol."
      />
    </div>
  );
}

More by a11ypros

View all
  • Accessible Accordion

    Accessible Accordion

    1
  • Accessible Radio Group

    Accessible Radio Group

  • A11y Label

    A11y Label

More in Buttons

View all
  • Button

    Button

    4
  • Button

    Button

    47
  • App Store Button

    App Store Button

    452
  • Eclipse Button

    Eclipse Button

    39
  • Texture Button

    Texture Button

    92
  • Split Button

    Split Button

    14
  • Native Button

    Native Button

    12
  • Button

    Button

    31