Skip to content

[Documentation] v-btn usage example should hide default slot output when using the icon prop #19816

Open
@06b

Description

@06b

Environment

Vuetify Version: 3.6.6
Vue Version: 3.4.27
Browsers: Edge 124.0.0.0
OS: Windows 10

Steps to reproduce

Add a v-btn with the icon along with some text within it, such as the example shown on the documentation.

Expected Behavior

  • The v-btn icon to render the icon.
  • Ideally the text to be added as an aria-label.

image

Actual Behavior

The v-btn icon does not appear and instead it renders the text in place of the icon resulting with the v-btn being round.
image

Reproduction Link

https://play.vuetifyjs.com/#...

Other comments

  • If I remove the content within the v-btn it renders the icon, & I can add the text via the text prop but it doesn't output that text, which this use case seems like a perfect example for handling accessible labels:
    <v-btn icon="$vuetify" text="button"></v-btn>

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions