Sub topic 1
Why some elements look clickable and others do not
Prerequisites
This chapter assumes you know basic HTML elements and attributes, and basic CSS: selectors, the box model, colors and pseudo-classes. You should also be able to open your browser's developer tools and inspect an element. No other tools are needed.
Affordances and signifiers
An affordance is an action that an object makes possible. A door handle affords pulling. A button on a web page affords clicking. A signifier is a visible cue that tells the user the affordance exists. The handle's shape is a signifier. So is a button's raised, filled look.
On the web, the browser gives some elements the affordance for free. A link can be followed and a button can be pressed whether or not you style it. The signifier, however, is your job. If CSS removes the underline from a link and makes it the same color as the surrounding text, the link still works, but nobody can tell.
Users do not read code. They judge an element by how it looks and decide in a fraction of a second whether to try it. A missing signifier makes people skip a control. A false signifier makes people click things that do nothing.
Common signifiers
Most clickable styling relies on a small set of cues:
| Cue | Typical use | Example |
|---|---|---|
| Underline | Inline links | Text with `text-decoration: underline` |
| Distinct color | Links and buttons | Blue text against black body text |
| Filled shape | Buttons | A solid background with rounded corners |
| Border | Secondary buttons | A 2px outline around the label |
| Pointer cursor | Mouse users only | `cursor: pointer` |
| State change | Hover, focus, pressed | Background darkens on hover |
Use more than one cue at a time. The cursor and hover change are only visible to mouse users, so touch and keyboard users never see them. A button that depends only on a hover effect looks plain to everyone on a phone.
A worked comparison
The two elements below do the same thing. The first has no signifiers. The second has several.
<span class="plain">Subscribe</span>
<span class="clear">Subscribe</span>
<style>
.plain {
color: #333333;
}
.clear {
display: inline-flex;
align-items: center;
min-height: 44px;
padding: 0 1.25rem;
border-radius: 8px;
background: #1d4ed8;
color: #ffffff;
font-weight: 600;
cursor: pointer;
}
</style>The plain version looks like a word in a sentence. The clear version has a filled background, rounded corners, padding, and high-contrast text. These cues together read as "press me". Note that a span is used here only to isolate the styling. A real control should be a button or an a, which the next chapter covers.
How the cues fail
Three mistakes account for most "does this click?" problems:
- Hidden signifiers. Links with no underline and low color difference from body text.
- False signifiers. Blue underlined text that is not a link, or a button-shaped box that is only a heading.
- Inconsistent signifiers. Links that look different on every page, so users cannot learn the pattern.
The diagram below shows how a user's decision flows from what they see.
Quick check with developer tools
Open any site and use the inspector to remove the text-decoration and color rules from a link. Compare how obvious it is before and after. This shows how much of the "clickable" feeling comes from CSS and not from the element itself.
Exercise
A designer styles all links with color: inherit; text-decoration: none so they match the body text. The links still work with mouse and keyboard. Which part of the affordance and signifier model is broken, and what is the smallest fix?
Show answer
The affordance is intact because the links can still be followed, but the signifier is gone, so users cannot tell the text is interactive. The smallest fix is to restore a visible cue, such as an underline (text-decoration: underline) and a color that differs from body text, so the cue does not rely on color alone.
Exercise
Why is cursor: pointer not enough on its own to make a button look clickable?
Show answer
Only mouse users with a visible pointer ever see it. Touch and keyboard users do not, so the element also needs a visible shape, color, or border.