tooltip
v1.0.0WAI-ARIA Tooltip 模式(从零构建)——将使用者的第一个 Element 子节点包装为触发器,hover 时打开(带 openDelay),focus 时立即打开;按 Escape 关闭,焦点仍留在触发器上;在 blur 或真正的 mouseleave 时关闭。设为 shadow:false,以便触发器上的 aria-describedby 能引用 tooltip 的 id。
安装
预览
用法
react
django-template
规范详情
原始注册表条目
{
"name": "tooltip",
"type": "ui-component",
"metadata": {
"ring": "1b",
"description": "WAI-ARIA Tooltip pattern (scratch build) — wraps the consumer's first Element child as the trigger, opens on hover (with openDelay) and focus (immediate), dismisses on Escape while keeping the trigger focused, and closes on blur or genuine mouseleave. shadow:false so aria-describedby on the trigger can reference the tooltip's id.",
"author": "neo",
"version": "1.0.0",
"created_at": "2026-08-26",
"dependencies": [],
"translations": {
"es": {
"description": "Patrón WAI-ARIA Tooltip (scratch build) — envuelve el primer Element child del consumidor como trigger, abre en hover (con openDelay) y en focus (inmediato), se cierra con Escape sin sacar el foco del trigger, y también en blur o mouseleave real. shadow:false para que aria-describedby del trigger pueda apuntar al id del tooltip."
},
"zh": {
"description": "WAI-ARIA Tooltip 模式(从零构建)——将使用者的第一个 Element 子节点包装为触发器,hover 时打开(带 openDelay),focus 时立即打开;按 Escape 关闭,焦点仍留在触发器上;在 blur 或真正的 mouseleave 时关闭。设为 shadow:false,以便触发器上的 aria-describedby 能引用 tooltip 的 id。"
},
"la": {
"description": "Exemplar WAI-ARIA Tooltip (ab integro aedificatum) — primum Element child eius qui utitur ut trigger involvit; in hover aperitur (cum openDelay) et in focus statim; Escape dimittitur, trigger focum servante; in blur aut in mouseleave germano clauditur. shadow:false, ut aria-describedby in trigger id tooltip attingere possit."
}
}
},
"spec": {
"tech": "stencil",
"tag": "ds-tooltip",
"tokens_used": [
"primitive.font.family",
"primitive.font.size-md",
"primitive.radius.sm",
"primitive.spacing.sm",
"primitive.spacing.xs"
]
}
}