Non-text contrast - Buttons example #3826
-
In the example used for Buttons it states that "a contrasting visual indicator to show that it is a button" is not required. Is there any rationale for why this is not a requirement or any indication if it will be in the future? It seems like the recommended approach is that users would benefit from having a visible hit area but is one step away from being a "must". Is there any concern about perceivable, operable and understandable in this context? |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 6 replies
-
The guidelines could/should not explicitly require this, as it's far too sweeping a requirement (and would instantly make the majority of the web content out there fail). If it's clear from layout, context, etc that something is a control, then that passes. Otherwise, imagine even on github here if we required every interactive element (link, button, etc) to have a clear border or distinguishing background ... it would turn the entire page into a giant button-fest, and would likely end up having the opposite effect for users, rather than provide clarity. |
Beta Was this translation helpful? Give feedback.
-
We tried to get a Visible Controls success criteria in WCAG 2.2 but it did not make it into the guidelines. This topic is of relevance for WCAG 3. |
Beta Was this translation helpful? Give feedback.
-
Buttons can provide an interesting study in some nuances of this discussion, especially if we look at some examples. IBM's Carbon design system provides 5 variations on classic buttons: primary, secondary, tertiary, danger, and ghost. (I'm ignoring all the other kinds of Carbon components that are also really just different kinds of buttons with tighter use case, such as operable tags, overflow menus, etc.) All except the ghost button either have a solid background or a strongly contrasting border. The ghost button is similar in appearance to some used in iOS, effectively appearing like a blue text link (with no underline). The text contrasts 3:1 against typical body text. It's important to mention that the colours of primary, secondary, and danger buttons (which all are solid) do not each contrast 3:1 with each other. But this is not a problem because 1) the importance of the button is conveyed in many ways besides colour, such as positioning and labelling -- the colour reinforces the nature of the button; 2) the interaction does not rely on users being able to recognize or express these 5 variants -- at best some users would be able to discuss what's different about a primary button on a page; 3) From a UX perspective, it is entirely possible to offer a far smaller palette of buttons and still have a functional page; 4) froma programmatic perspective, neither the implicit nor explicit role of "button" include a bunch of attributes that dictate a need for users to distinguish a vareity of button variants -- a single variant could represent all button states. You'll notice that outside of the fact they each have a text label within the control, there is nothing that unites these buttons visually. Yet they can all provide the same basic function on a page. If you look through the Carbon style documentation, you'll see that a ghost button becomes more classically 'button-like- on focus or hover. So, once being interacted with, it becomes a bit more clearly not a link (for any users that even think about it). Ultimately, all these variations do not negatively impact time on task and usability for users. In fact, in many situations they improve those kinds of metrics for some users. If the AGWG attempted to become more prescriptive in dictating the visual appearance of a button, we would risk failing well thought out component libraries, with little to demonstrate as benefit for any user group. |
Beta Was this translation helpful? Give feedback.
-
Since you've accepted the answer, I'm going to assume this discussion can be closed. Anyone should feel free to re-open if they have more to add. |
Beta Was this translation helpful? Give feedback.
The guidelines could/should not explicitly require this, as it's far too sweeping a requirement (and would instantly make the majority of the web content out there fail). If it's clear from layout, context, etc that something is a control, then that passes.
Otherwise, imagine even on github here if we required every interactive element (link, button, etc) to have a clear border or distinguishing background ... it would turn the entire page into a giant button-fest, and would likely end up having the opposite effect for users, rather than provide clarity.