icon-buttons
Installation
SKILL.md
If .ux-profile.md exists at the project root, read it before changing surfaces, forms, or focus behavior.
Intent
Dense toolbars waste space on repeated chrome labels. Square icon buttons reclaim that space when the mark is conventional — but an unlabeled icon without a hover/focus name is opaque. This skill decides when to collapse a label to an icon, and requires a real tooltip (plus shortcut kbd when one exists) every time you do.
Hard Rules (Non-Negotiable)
- Every icon button shows a tooltip on hover and on keyboard focus. Tooltip text is the same verb-first label the button would have had (
Export CSV, notCSV). Matchverbscapitalization and sentence case. - If the action has a shortcut, the tooltip must include the project’s Kbd component. If the project has no Kbd primitive, append the shortcut as label text. Platform-aware:
⌘Kon Mac,Ctrl+Kelsewhere — seekeyboardkeybinding matrix. title="..."is not a tooltip. Nativetitleis too slow, cannot host a kbd, and fails this skill. Use a real tooltip surface (popover / tooltip primitive).- Accessible name is required separately. Set
aria-label(or visible text) matching the tooltip label. A tooltip is not an accessible name. - The control is square (equal width and height). Hit-target size follows
viewports(44×44 AA / 48×48 AAA). A 16px glyph is not the tap area.
See reference/icon-button-contract.md for when/not tables, tooltip anatomy, and markup.
Design Heuristics & Taste Principles
Prefer icon buttons for: