Page MenuHomePhabricator

Button: Consider deprecating the quiet button in Codex
Open, Needs TriagePublic

Assigned To
None
Authored By
matmarex
May 15 2023, 1:58 PM
Referenced Files
F72153601: image.png
Feb 17 2026, 3:45 PM
F72153599: image.png
Feb 17 2026, 3:45 PM
F36782631: Screenshot 2023-02-07 at 12.39.01.png
May 24 2023, 5:44 PM
F37021768: image.png
May 19 2023, 8:45 PM
F37021766: image.png
May 19 2023, 8:45 PM
F36998186: image.png
May 15 2023, 6:18 PM

Description

Here's how a basic quiet button looks like in Codex:

Button

That's it, it's just text, with no indication that it's interactive until you interact with it. I believe this goes against the accessibility principle of making our interfaces understandable for everyone (https://doc.wikimedia.org/codex/latest/style-guide/accessibility.html).

I am requesting that styling buttons this way be discouraged. Ideally, weight: 'quiet' would be treated like 'normal' if the button is not progressive, not destructive and has no icon. If that's not feasible, I'd appreciate a runtime warning, and if that's not feasible, then at least some discussion of the problem in the documentation (https://doc.wikimedia.org/codex/latest/components/demos/button.html).

image.png (606×1 px, 57 KB)

It's not completely impossible to use this component in an acceptable way (e.g. a basic quiet button placed in a group with other kinds of buttons is probably understandable enough), but it is still always worse than any other kind of component (or even a plain non-Codex link).


Unfortunately buttons like that are not forbidden by WCAG (I found an interesting discussion of this at https://github.com/w3c/wcag/issues/800 and further links for in that thread, which I'd summarize as "it's not an accessibility issue, because it's equitably bad for everyone"), although they're touched on briefly in some sections of https://www.w3.org/WAI/WCAG21/Understanding/non-text-contrast.html:

Note that for people with cognitive disabilities it is recommended to delineate the boundary of controls to aid in the recognition of controls and therefore the completion of activities.

A button which has a distinguishing indicator such as position, text style, or context does not need a contrasting visual indicator to show that it is a button, although some users are likely to identify a button with an outline that meets contrast requirements more easily.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Hi @matmarex, thanks for reporting this - the Design Systems Team will review this by 2023-05-22 and let you know what to expect.

Hey @matmarex, thanks again for reporting this. Was there an underlying issue you ran into that prompted this, or was it just a general observation when going through the docs?

One of the motivations behind the quiet button is for buttons with icons, like the "Dismiss" buttons in the Dialog or Message components for example (see below).

image.png (265×528 px, 27 KB)

image.png (76×660 px, 5 KB)

I agree that the quiet text-only buttons look ambiguous though. I think a first pass would be to provide better guidelines in the documentation (as @Volker_E linked to) instead of adding complexity to the component (i.e. making props available only in specific cases, like if a button includes an icon). Does that sound sufficient? That would be something we would be able to prioritize soon. Updating the component or deprecating the prop would require much more discussion and would be lower priority.

Ignoring implementation details, does it really make sense to consider that control a "button"?

Ignoring implementation details, does it really make sense to consider that control a "button"?

Well it technically is a button, and is commonly represented as one in web UIs. I'm not sure it would make sense to create a whole new component to represent this use case.

I also realized in some instances (see T332767: OnboardingDialog: Add OnboardingDialog component pattern to Codex), there are legitimate use cases for the text-only quiet button. This would be another reason to consider guidelines over deprecation.

Edit: that doesn't mean the accessibility of these buttons can't be improved though.

I also realized in some instances (see T332767: OnboardingDialog: Add OnboardingDialog component pattern to Codex), there are legitimate use cases for the text-only quiet button. This would be another reason to consider guidelines over deprecation.

I assume you mean this one: (and a few variants of the same dialog)

Screenshot 2023-02-07 at 12.39.01.png (1×1 px, 132 KB)

For me, this isn't a legitimate use, but instead it's an example of exactly the problem I am trying to point out! The "Skip all" button looks almost the same as the nearby text. It's only identifiable due to its placement (although imagine the mockup being in Arabic rather than English, with right-to-left text direction: I'm sure none of us who don't speak the language could confidently identify which is the title and which is the button in that case). It's not terrible, but if the button was instead an "x" icon, or if it had a button frame, it would be better. The text-only quiet button is always the worse option.

Ignoring implementation details, does it really make sense to consider that control a "button"?

Well it technically is a button, and is commonly represented as one in web UIs.

If you define "button" as "something that responds to a mouse click", then, sure. But the close widget has distinctively different behaviours from a button qua button. Case in point, we now have awkward "quiet" buttons because we're trying to shoehorn a button into the role of a close widget.

For me, this isn't a legitimate use, but instead it's an example of exactly the problem I am trying to point out! The "Skip all" button looks almost the same as the nearby text. It's only identifiable due to its placement (although imagine the mockup being in Arabic rather than English, with right-to-left text direction: I'm sure none of us who don't speak the language could confidently identify which is the title and which is the button in that case). It's not terrible, but if the button was instead an "x" icon, or if it had a button frame, it would be better. The text-only quiet button is always the worse option.

Point taken. I do agree that just because there are existing uses, doesn't mean they cannot be improved.

Going to backlog this item for now. We'll consider this as part of T329963: Provide guidelines on when to choose which basic interaction element in Codex and this task can be updated based on the outcome there (i.e. the guidance might be that we need to deprecate the text-only quiet button, or it might be that we just need to provide guidelines & usage warnings).

My memory says that when EditPage got the OOUI freshening that the Cancel button got the quiet treatment and there was some consternation about that. T165122: "Cancel" button in action=edit must not look like a red link jumps out at me as one version of it. (T42601 looks to have happened earlier, and T64304 looks interesting too.) JFYI.

My memory says that when EditPage got the OOUI freshening that the Cancel button got the quiet treatment and there was some consternation about that. T165122: "Cancel" button in action=edit must not look like a red link jumps out at me as one version of it. (T42601 looks to have happened earlier, and T64304 looks interesting too.) JFYI.

That's helpful context, thank you!

Going to backlog this item for now. We'll consider this as part of T329963: Provide guidelines on when to choose which basic interaction element in Codex and this task can be updated based on the outcome there (i.e. the guidance might be that we need to deprecate the text-only quiet button, or it might be that we just need to provide guidelines & usage warnings).

It looks like the outcome of that is this note, visible at https://doc.wikimedia.org/codex/main/style-guide/using-links-and-buttons.html#weight:

Use Quiet Buttons for an easily recognizable action that does not detract focus from the content. Be conscious of the fact that Quiet Progressive Buttons can look similar to Links, so avoid using them next to each other.

This is better than nothing, so thank you for doing that, but I would still like to see this design antipattern be discouraged more clearly.

Noting from T235463#9543787 that @matmarex also wrote that new guidelines:

still doesn't explain why you would use this kind of button instead of a normal button.

I would agree with this. The guidelines cover quiet progressive buttons, but quiet default buttons (which are the most confusing) are actually recommended.

From https://doc.wikimedia.org/codex/main/style-guide/using-links-and-buttons.html#buttons

TIP: Use Quiet Buttons to emphasize Normal Buttons when both are combined on the same page.

I still don't know that we need to explicitly deprecate the default quiet button, but maybe the guidelines should discourage its use. cc: @DTorsani-WMF

This can be a tricky one. It is true that Quiet Buttons do not visually denote the notion of something interactive. Always using the Progressive (blue) versions can fall into the trap of appearing as links, which can present other accessibility challenges. In some rare but important and commonly interacted with instances, we style a link as a button to draw more visual attention to it and to fit in with surrounding interface elements. These are all reasons why it is difficult to make one clear decision and difference of what style to use.

The aspect of any action, link or button, that denotes its notion as an action the most is the text used. So my suggestion would not be to deprecate this style of the Codex Button or even discourage its use, but to ensure that the content within a button is properly written. Using verbs and more information about how to write for buttons can be found here https://doc.wikimedia.org/codex/latest/components/demos/button.html#content.

bmartinezcalvo renamed this task from Deprecate the basic quiet button in Codex to Button: Consider deprecating the quiet button in Codex.Mar 4 2025, 7:08 PM

Another issue with quiet normal Buttons is that they look the same as text. So I wonder if we could consider restyling them from color-base to color-subtle so it's visually easier to differentiate the actions from the text when both are placed next to each other.

image.png (432×824 px, 44 KB)
image.png (432×824 px, 44 KB)
Current behaviorProposed change using color-subtle

The most important factor within an action that should denote is actionability is the verbiage used. It should be a verb, as in something that is taking action. For accessibility reasons, such as varying colorblindnesses, low or blurry vision, or the use of screen readers, the color and style cannot be the main factor for what denotes an action. Instead the label should do its best at doing so. That being said, I think the update to using @color-subtle is an appropriate visual update.

The most important factor within an action that should denote is actionability is the verbiage used. It should be a verb, as in something that is taking action. For accessibility reasons, such as varying colorblindnesses, low or blurry vision, or the use of screen readers, the color and style cannot be the main factor for what denotes an action. Instead the label should do its best at doing so. That being said, I think the update to using @color-subtle is an appropriate visual update.

@DTorsani-WMF great, I've created this task for that style change T417659: Quiet Normal Button: Consider updating to new @color-neutral