Skip to content

feat(docs): replace native title= attributes with Tooltip component (#495) - #642

Closed
sridhar-3009 wants to merge 1 commit into
vuetifyjs:masterfrom
sridhar-3009:docs/replace-title-with-tooltip-495-docs
Closed

feat(docs): replace native title= attributes with Tooltip component (#495)#642
sridhar-3009 wants to merge 1 commit into
vuetifyjs:masterfrom
sridhar-3009:docs/replace-title-with-tooltip-495-docs

Conversation

@sridhar-3009

Copy link
Copy Markdown
Contributor

Summary

Continues the #495 migration by replacing native title= HTML attributes in apps/docs with the Tooltip.Root / Tooltip.Activator / Tooltip.Content compound component, following the same patterns already applied to apps/playground in #637.

  • DocsExample.vue — 5 icon-only buttons (Reset example ×2, Open in Playground, Open in Bin, Combine/Split files) converted; Tooltip added to imports
  • AppSettings.vue — Settings button replaced with Tooltip.Activator (which renders as <button> by default); Tooltip added to imports
  • AppAccount.vue — Sign-in button wrapped in Tooltip.Root; Account settings button (inside Discovery.Activator) uses the renderless Tooltip.Activator pattern to spread hover/focus/aria-describedby attrs onto the native button; Tooltip added to imports
  • AppSkillFilter.vuePopover.Activator (inside Popover.Root) wrapped via renderless Tooltip.Activator; Tooltip added to imports
  • AppBar.vue — Search, Discord, and GitHub elements already had aria-label; redundant title= attributes removed

Tooltip.Content styling

All new Tooltip.Content elements use class="px-2.5 py-1.5 rounded border border-divider text-xs bg-surface text-on-surface shadow-lg", matching the pattern established in DocsMaturity.vue.

Not included

Dynamic title= bindings in DocsCodeActions.vue, DocsAskPanel.vue, DocsSearch.vue, AppSettingsSheet.vue, and others — those have more complex patterns (dynamic text, third-party GnActionButton) and will be addressed in follow-up PRs.

Closes part of #495

…uetifyjs#495)

Replace native HTML title= attributes in docs app components with the
Tooltip.Root / Tooltip.Activator / Tooltip.Content compound component:

- DocsExample.vue: 5 icon buttons (Reset, Open in Playground, Open in
  Bin, Combine/Split) converted from title= to Tooltip wrappers
- AppSettings.vue: Settings button — button replaced with
  Tooltip.Activator (renders as button)
- AppAccount.vue: Sign-in button wrapped in Tooltip.Root; Account
  settings button inside Discovery.Activator uses renderless
  Tooltip.Activator pattern to spread hover/focus attrs
- AppSkillFilter.vue: Popover.Activator wrapped via renderless
  Tooltip.Activator inside Popover.Root
- AppBar.vue: Search, Discord, and GitHub elements already had
  aria-label; native title= removed
@johnleider

Copy link
Copy Markdown
Member

This PR currently has merge conflicts with its base branch (master) and can't be merged as-is. Could you rebase onto the latest master and resolve the conflicts when you get a chance?

Context: we're adopting a git-flow branch model — master for fixes/patches, dev for features (minor), next for breaking changes (major). This PR is correctly targeting master; it just needs a rebase to clear the conflicts. Thanks!

@johnleider

Copy link
Copy Markdown
Member

Thanks for the work here, and apologies for the overlap. Closing this — it's been superseded.

The day after these PRs were opened, #621 landed and closed #495 by introducing a reusable AppTooltip wrapper and migrating the entire docs + playground chrome to it (now used in ~37 files on master). As a result:

One thing worth carrying forward regardless: Tooltip.Activator spreads aria-describedby (a description), not an accessible name. Several icon-only controls in this diff dropped title= without keeping an aria-label, which removes their accessible name (WCAG 4.1.2). AppTooltip and the retained aria-labels on master avoid that.

If you'd like to keep contributing to this area, the remaining un-migrated spots are the GnActionButton title= props in DocsCodeActions.vue — those should go through AppTooltip (renderless slot), not inline compounds. Happy to point you at a good first issue.

@johnleider johnleider closed this Jul 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants