Skip to content

Improve documentation of the showTooltip prop in various components #66523

@afercia

Description

@afercia

Description

Splitting this out from #60908 (comment)

It would be good to add some guidance about its effective usage, specifically in combination with the case when the 'Show button text labels' preferences (showIconLabels) is enabled. It's worth considering explaining the a11y best practices that surround this and help to guide future contributors.

It's wirth reminding that when showIconLabels is enabled, icon buttons switch to show visible text and in this case showing a tooltip that just repeats the visible text is unnecessary clutter. Example:

Screenshot 2024-04-19 at 15 22 29

Cc @getdave

Step-by-step reproduction instructions

N/A

Screenshots, screen recording, code snippet

No response

Environment info

No response

Please confirm that you have searched existing issues in the repo.

  • Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

  • Yes

Please confirm which theme type you used for testing.

  • Block
  • Classic
  • Hybrid (e.g. classic with theme.json)
  • Not sure

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