Repository navigation
Conversation
|
Regarding the second In summary: No big benefits, other than on devices without mouse support and thus no hoverable - meBack to your earlier suggestion of not using AIThere’s no inherent WCAG compliance advantage: both For example, these can produce the same screen-reader announcement: <a href="/settings" aria-label="Settings">
<svg aria-hidden="true">…</svg>
</a><a href="/settings">
<svg aria-hidden="true">…</svg>
<span class="icon-link__label">Settings</span>
</a>The second assumes I prefer text content for a few practical reasons:
The tooltip’s behaviour matters more for compliance than which source supplies its text. A custom tooltip still needs appropriate keyboard access and must meet the applicable dismissible, hoverable, and persistent requirements. Neither naming approach provides those automatically. Content on Hover or Focus So I’d recommend the hidden-text pattern for simplicity and maintainability, rather than claim it gives screen-reader users a fundamentally better accessible name. |
feat(pat-tooltip): Allow aria-label attributes as tooltip sources. (
sourceoption:aria-label)feat(pat-tooltip): Add content-text as source, which extracts the triggers text without markup. (
sourceoption:content-text)From the docs:
sourcetitleajaxcontentcontent-texttitlearia-labelajaxload the tooltip contents from the link target url or from a selector given by thehrefattrobite.content: tooltip contents are the tooltip elements children.content-text: trimmed text content of the trigger, including visually hidden text, displayed as plain text.title,aria-label: tooltip content is the title resp aria-label attribute value.