Skip to content

fix(VSelect): pass title attribute to root element#22951

Open
sridhar-3009 wants to merge 1 commit into
vuetifyjs:masterfrom
sridhar-3009:fix/select-title-attribute-22730
Open

fix(VSelect): pass title attribute to root element#22951
sridhar-3009 wants to merge 1 commit into
vuetifyjs:masterfrom
sridhar-3009:fix/select-title-attribute-22730

Conversation

@sridhar-3009

Copy link
Copy Markdown
Contributor

Summary

Fixes #22730

The HTML title attribute was not being forwarded to the root element on v-select (and other input-based components), so tooltip-on-hover via <v-select title="foo"> had no effect.

Root cause: filterInputAttrs in src/util/helpers.ts splits fallthrough attributes into two groups:

  • rootAttrs → applied to the component's root element (class, style, id, inert, data-*, event listeners)
  • inputAttrs → applied to the inner <input> element

title was not in the root list, so it landed on the inner <input> which is hidden/inert in v-select and not visible to the user.

Fix: Add 'title' to the list of attributes forwarded to the root element in filterInputAttrs.

This single-line change fixes title for all components that use filterInputAttrs:

  • v-select
  • v-text-field
  • v-textarea
  • v-slider / v-range-slider
  • v-otp-input
  • v-selection-control (checkbox, radio, switch)
  • v-file-upload
  • v-radio-group
  • v-img

Test plan

  • Add title="foo" to a v-select and verify the browser tooltip appears on hover over the control
  • Verify the same works on v-text-field, v-textarea, v-slider
  • Existing tests pass: pnpm test

Add 'title' to the list of attributes forwarded to the root element in
filterInputAttrs, so the HTML title tooltip attribute works on VSelect
and all other input-based components (VTextField, VTextarea, VSlider, etc).
@J-Sek

J-Sek commented Jun 28, 2026

Copy link
Copy Markdown
Contributor

Demo

Behavior change might feel like regression

  • VTextField append slots started showing title and require their own title='...' in case field title is not appropriate
  • Most of the other components started showing title when hovering hint/error/counter and labels

If you the PR states fix(VSelect), it would be nice to avoid affecting everything else.

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.

[Bug Report][4.0.2] title attribute does not work on V-Select

2 participants