The Two Button Problem

Chris Coyier Chris Coyier on

I see this UI/UX issue all the time: there are two buttons, and it’s not clear which one of them is in the active state. Here’s an example from my TV:

Which one of those two buttons above is active? Like if I press the enter/select button on my remote, am I selecting “Try it free” or “Sign in”? It’s entirely unclear to me based on the design. Those two design styles are ambiguous. Just two random selections from today’s trends of button design.

If I press the up (or down) arrows on my remote, the styles of the buttons just reverses, so even interacting with the interface doesn’t inform the choice.

This is a problem that can be solved at multiple levels. If the buttons are toggles that affect on-page content, the accessibility angle is partially solved by the aria-selected attribute, for example. It’s also slightly less of an issue on devices with a cursor, as you likely just click on the one that you want. This is mostly a problem with remote control and keyboard usage where the active state is unclear or ambiguous.

I call it the “two button” problem because if there were more than two buttons, the one that is styled differently is probably the one that is active. We could use our grade school brains to figure out which button is active.

(via)

Ideally, though, we don’t have to think very hard. It should be obvious which one is active.

Again, the problem:

The most obvious solution here is to make both button styles the same, but be additive when one of them is the active button.

I feel like it’s very clear now that “Try it free” is the selected button now. Even if it’s not to a user immediately. If they tab/arrow/whatever to the other button, that outline design will move to it and it will become clear then.

You could also, ya know, literally point to it:

Perhaps you could resort to more “extreme” design styles like this when there is prove-ably no mouse/cursor involved, like:

@media (hover: none) and (pointer: coarse) {
  button:active {
    /* big obvious arrow styles */
  }
}Code language: CSS (css)

We’ve got a recent post on @media queries that goes into lots of situations like this!

This “two button” problem also can come up in the design pattern of “toggles”. Take something like this:

A “pill” toggle design pattern.

Which one of those buttons is currently active? The up arrow? The down arrow? Neither? It’s impossible to tell by look alone.

Sometimes in this case the “active” button is “grayed out”:

The implication here is that the up arrow is the “active” one, so you don’t need to press it again as it won’t do anything. Only the non-active button is pressable. I feel like this is okay-ish as a pattern, but it’s not my favorite as the active state is less prominent instead of more prominent almost indicating it’s disabled for some other reason or doesn’t matter.

This kind of thing makes me almost miss the days of skeuomorphism where digital interfaces were designed to try to mimic real world surfaces and objects. We don’t have to go full leather-coated buttons though, we can just make the active button appear pressed through shadows and flattening.

This situation differs from the TV interface issue above in that this “active” button is indicating the button has already been pressed, not that it’s the button that will be pressed. So you’d need a style for that state as well.

Maybe these aren’t the most amazing examples in the world, but I hope I’ve got you thinking about the two-button problem. When there are only two buttons, you can’t just pick two arbitrary different styles, as that doesn’t help people understand which of the two are active. You need to think about it a little deeper and get those styles in a place where it’s obvious.

Wanna be a better designer?

Frontend Masters logo

Sarah Drasner is a heck of a designer, and has a wonderful course called Design for Developers where you'll learn to be a self-sufficient designer.

7-Day Free Trial

5 responses to “The Two Button Problem”

  1. Brian M says:

    Yes this design issue is as old as GUI software (if not older!).
    The other classic example is the toggle switch as seen in many cookie option pages, does it mean its off or slide to switch off – Although that is probably viewed as a design success as it confuses the user!

    Same with indicators is green on (go) or is red on (danger).

    Same is also seen in the real world objects can never remember the power switch symbol o is on or is it off?

  2. Vinay Thoke says:

    The light/dark mode switches. Should they show the current state or the intent?

  3. Bill Heigh says:

    Excellent point Chris! I’ve experienced this many times, and I like that you not only pointed the (maybe not so) obvious issue, but also gave some suggestions to avoid the ambiguity in the UI/UX arena to developers everywhere.

  4. You would not use aria-selected on buttons (it’s not allowed on them). For buttons you would use aria-pressed. In the case of exclusive buttons (like a toggle), the author could lean on aria-pressed to indicate the selected (by the user or by default) button.

    For the opening example (a Paramount screen upselling its sports plan with one button labeled “Try it free” in white on light blue and another labeled “sign in” in white on a transparent background but with a white border), a blind screen reader user would hear which has focus. The sighted user, to your point, would need focus styles. Personally, I’m a fan of the giant honkin’ arrow.

  5. Chris Coyier says:

    Just as a bit of bonus information, if I revisited the screen of the first screenshot recently and took a guess about which one was active. I figured it would be the white-outline version somehow. Nope, I was wrong, it’s the filled-in blue style that means active.

Leave a Reply to Chris Coyier Cancel reply

Your email address will not be published. Required fields are marked *

$839,000

Frontend Masters donates to open source projects through thanks.dev and Open Collective, as well as donates to non-profits like The Last Mile, Annie Canons, and Vets Who Code.