هل تعلم؟dyk.si

التلميح Tooltip

نص صغير يظهر عند التأشير بالمؤشر على أيقونة أو الضغط المطوّل عليها، ليشرح ما تفعله.

role="tooltip" + aria-describedby

متى تستخدمه

لشرح أيقونة لا تحمل نصاً.

خطأ شائع

لا تضع فيه روابط أو أزراراً، فهذا دور الـ Popover.

إمكانية الوصول

Show it on keyboard focus too, and never hide essential information inside a tooltip.

اسمه في الكود

HTML/CSSrole="tooltip" + aria-describedby
React<Tooltip>
Jetpack ComposeTooltipBox + PlainTooltip
SwiftUI.help("…")

برومبت جاهز لوكيل البرمجة

Add a Tooltip to this screen. What it is: A small text label that appears on hover or long-press to explain what an icon does. Implement with: role="tooltip" + aria-describedby (HTML/CSS). Accessibility: Show it on keyboard focus too, and never hide essential information inside a tooltip. When to use it: To explain an icon that has no text label. Avoid: Don’t put links or buttons in it; that’s a popover. Reuse the project's existing design tokens, spacing and component conventions.

أو ركّب صفحة كاملة من هذا العنصر وغيره →

البرومبت بالإنجليزية لأنها الأدق مع Claude Code وأمثاله.

يُخلَط بينه وبين عناصر أخرى؟

⇄ Tooltip أم Popover أم Menu؟