Tooltips: replace the native title attribute with nldd-tooltip #197
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Waggle uses the native
titleattribute for tooltips in 40 places andnldd-tooltipin none. That is an accessibility gap rather than a styling one: a nativetitlenever appears on keyboard focus, is unreachable on touch, has a ~1s delay we cannot tune, and is announced inconsistently by screen readers.Measured on the current
main(counts are per element, not per file).1.
titleduplicatesaria-label— 11 elementsThe same string appears twice on one element. The tooltip adds nothing, and a screen reader can end up announcing the accessible name twice.
components/cards/CardRow.vue(4)components/cards/CardDetailsModal.vue(2)components/composer/EmojiPicker.vue(2)components/attachments/AttachmentPreview.vue,HtmlPreviewModal.vue,PdfPreviewModal.vue(1 each)Fix: drop the
title. No component needed.2.
titlesays something different fromaria-label— 4 elementsTwo different strings on one element, so what a mouse user sees and what a screen reader hears diverge.
aria-labeltitleAttachmentPreview.vue{naam} downloadenDownloadenCardDetailsModal.vueAfbeelding {naam} vergroten{naam}BubbleMenuButton.vueBubble uptriggerTitleSendButton.vueInplannen voor laterSendButtonis the interesting one: the title carries why the button is disabled ("Schrijf eerst een bericht"). That is exactly the information a keyboard user never gets today, because a disabled control cannot be hovered andtitledoes not fire on focus.Fix: decide per case whether the text is a name (belongs in
aria-label) or a description (belongs in a tooltip witharia-describedby).3. Genuine tooltips,
titleonly — 22 elementscomponents/scheduling/QueuedRow.vue(5)components/attachments/HtmlPreviewModal.vue(3),PdfPreviewModal.vue(3)components/scheduling/ScheduledStripModal.vue(3)components/cards/MmSourceBreadcrumb.vue(2)CardRow.vue,ImageLightbox.vue,ReplyComposer.vue,SendButton.vue,DraftBadge.vue,DevUserSwitcher.vue(1 each)Fix:
nldd-tooltip. It wraps the child withdisplay: contentsso layout is untouched, shows on hover and focus, suppresses itself on touch, setsaria-describedbyitself, and takesplacementandtiming(instant/default/never).Why this is its own issue
Split off from #181 deliberately. That one is about typography and design tokens; this changes behaviour - focus, touch, and what a screen reader announces - so it wants its own pass with a keyboard and a screen reader, and a judgement per element on whether the text is essential or decorative.