Matt Montenegro's Backstage

Tooltip only when the text is truncated

by @pqoqubbw · · UI/UX

Tooltip only when the text is truncated

Dmytro proposes setting the title attribute dynamically with pretext only when the text really needs it, avoiding changes to the rest of the interface. A reference for the finish of truncated text; visual result and accessibility conditions were not verified.

Post text

you can dynamically set the title attribute using the @𝚌𝚑𝚎𝚗𝚐𝚕𝚘𝚞/𝚙𝚛𝚎𝚝𝚎𝚡𝚝 only when the text actually needs it, leaving everything else untouched it’s a nice little quality-of-life improvement for truncated text

Open the post on X ↗Open in the archive

Similar references