Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Button: Standardise text labels for icon buttons #48272

Open
getdave opened this issue Feb 21, 2023 · 1 comment
Open

Button: Standardise text labels for icon buttons #48272

getdave opened this issue Feb 21, 2023 · 1 comment
Labels
[Feature] UI Components Impacts or related to the UI component system [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). [Package] Components /packages/components [Type] Enhancement A suggestion for improvement.

Comments

@getdave
Copy link
Contributor

getdave commented Feb 21, 2023

For buttons which are displayed as icons only, it's important that they have a text based alternative which can be toggled on/off via editor preferences under Appearance -> Show button text labels.

Currently it appears the CSS required to do this needs to be reimplemented for each location. It would be helpful if the component-side of this was standardised in the base component.

#47930 is an example of ensure a given UI supports text only labels.


@tellthemachines In a followup it feels like we should make this standardised CSS somehow.

@ciampo This CSS allows us to use text alternatives for icon buttons. Is it possible to bake this into the component in @wordpress/components?

Originally posted by @getdave in #47930 (comment)

@getdave getdave added [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). [Feature] UI Components Impacts or related to the UI component system [Block] Buttons Affects the Buttons Block [a11y] Labelling labels Feb 21, 2023
@ciampo ciampo changed the title Standardise text labels for icon buttons Button: Standardise text labels for icon buttons Feb 21, 2023
@ciampo ciampo added [Package] Components /packages/components and removed [Block] Buttons Affects the Buttons Block labels Feb 21, 2023
@tellthemachines
Copy link
Contributor

We haven't standardised this yet because the rollout of text labels has been progressive, and there are parts of the editor where design work is still needed to rethink component layout to support text labels. Once we have them working across the whole interface, then we might be able to refactor the CSS to apply globally, but currently that would break too much of the UI. See #46299 for more discussion on this!

@jordesign jordesign added the [Type] Enhancement A suggestion for improvement. label Jul 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] UI Components Impacts or related to the UI component system [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). [Package] Components /packages/components [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

5 participants