Sub topic 1
Why some elements look clickable and others do not
Prerequisites
This chapter assumes you know the following:
- Basic HTML elements and attributes, such as
a,button,classandhref. - Basic CSS: selectors, the box model, colors and pseudo-classes such as
:hover. - How to open a browser's developer tools and inspect an element's styles.
You do not need any JavaScript for this chapter. The goal is a working mental model of why people click some things and ignore others. Later chapters apply that model to specific components.
The problem: users cannot read your mind
A page gives the user no manual. People decide what to click in a fraction of a second, by looking. If a control looks like plain text, many users will not try it. If plain text looks like a control, users will click it and nothing will happen.
Both mistakes cost you something. A missed button means a lost sign-up, an unread document or a task left unfinished. A false button wastes time and erodes trust in the rest of the page.
Designers have two terms for this problem: affordance and signifier. Both come from design research, and both are worth getting precise.
Affordances and signifiers
An affordance is a relationship between an object and a person that makes an action possible. A door handle affords pulling. A flat plate on a door affords pushing. The affordance exists whether or not anyone notices it.
A signifier is a perceivable cue that tells a person where the action is and how to perform it. The handle's shape is a signifier. So is a "PUSH" label on a plate.
On the web the distinction matters because the affordances are mostly fixed by the browser and your HTML, while the signifiers are entirely your CSS and content.
- A real
<button>or<a href>gives the browser the affordance: it can be clicked, focused with the keyboard and activated with Enter or Space (for a button) or Enter (for a link). - Your styles supply the signifier: fill, border, underline, color, shape, cursor and state changes.
Two failure modes follow from this split.
| Failure | What it means | Example |
|---|---|---|
| Affordance without a signifier | The element works, but nothing tells the user | A link styled with the same color as body text and no underline |
| Signifier without an affordance | The element looks clickable, but does nothing | A blue underlined word that is only emphasis, or a card with a button-like badge that is not interactive |
A third case is worth naming. A <div> styled like a button with a click handler has a signifier and a partial, scripted affordance. It does not receive keyboard focus, does not respond to Enter or Space and is not announced as a button by screen readers unless you rebuild all of that by hand. The next chapter covers choosing the correct element.
The signifiers users already know
Users arrive with habits learned on thousands of other sites. Most of those habits come down to a small set of cues. You do not have to invent a new language. You only have to use the existing one clearly.
- Underline. The oldest signifier for a link. Underlined text reads as clickable even without color.
- Link color. Blue is the long-standing default in browsers. Any color works if it differs from body text and is applied consistently.
- Filled shape. A solid rectangle with rounded or square corners and a label inside reads as a button.
- Border. An outline around a label suggests a control. It is weaker than a fill but still readable.
- Padding. Space around a label makes it look like an object rather than a word in a sentence.
- Shadow or raised edge. Suggests a physical surface that can be pressed. Use it lightly.
- Pointer cursor. The hand cursor on hover confirms the element is interactive, but only on devices with a mouse.
- State change. A shift in color, an outline or a small movement in response to hover, focus and press tells the user the element is live.
- Icon or arrow. A chevron or arrow beside a label suggests navigation.
No single cue is required. Strong signifiers combine two or three. A filled, padded, rounded rectangle with a bold label needs no underline. A phrase inside a paragraph needs an underline or an equally strong cue, because it has no shape to rely on.
Context changes how much signal you need
The same styling can be obvious in one place and ambiguous in another. Consider how much a user has to infer.
- Inside a paragraph. Words are surrounded by other words. Only a visible difference such as an underline separates a link from its neighbors.
- In a navigation bar. Position is a signifier. Users expect a row of items at the top of a page to be links, so plain text is acceptable if the layout is conventional.
- In a form. A rectangle near the end of a form is expected to submit it. A filled style helps it stand out from the fields.
- In a card or list. A whole card may be clickable. If only a small title inside it is a link, users may not discover that, so the cue has to be strong or the whole card should be the target.
Position and convention reduce the work your styles must do, but they never remove it. Relying on position alone fails on small screens, where layouts collapse and conventional places disappear.
A worked comparison
The following markup has the same three elements twice. The first set has the affordances but weak signifiers. The second set has the same affordances with clear signifiers.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Signifier comparison</title>
<style>
body {
font-family: system-ui, sans-serif;
line-height: 1.5;
max-width: 40rem;
margin: 2rem auto;
padding: 0 1rem;
color: #1f2937;
}
/* Weak signifiers: the elements work, but nothing says so. */
.weak a {
color: inherit;
text-decoration: none;
}
.weak button {
border: none;
background: none;
font: inherit;
padding: 0;
}
/* Strong signifiers: color, underline, fill, padding and shape. */
.strong a {
color: #1d4ed8;
text-decoration: underline;
text-underline-offset: 0.15em;
}
.strong button {
min-height: 44px;
padding: 0 1.25rem;
border: 2px solid #1d4ed8;
border-radius: 8px;
background: #1d4ed8;
color: #ffffff;
font: inherit;
font-weight: 600;
cursor: pointer;
}
</style>
</head>
<body>
<section class="weak">
<h2>Weak signifiers</h2>
<p>Read the <a href="/docs/getting-started">getting started guide</a> first.</p>
<button type="button">Save changes</button>
</section>
<section class="strong">
<h2>Strong signifiers</h2>
<p>Read the <a href="/docs/getting-started">getting started guide</a> first.</p>
<button type="button">Save changes</button>
</section>
</body>
</html>Save this as a file and open it in a browser. In the first section, the link is indistinguishable from the sentence around it, and the button looks like a word. Both still work, and a keyboard user can still reach them. A mouse user has to hover over each one to find out.
In the second section, the link is colored and underlined, and the button is a filled rounded rectangle with a label. Nothing about the behavior changed. Only the signifiers did.
How to read a page for signifiers
You can audit any element with three questions, in this order.
- Is it distinguishable? Would someone who has never seen this page see that this element differs from the plain text or decoration around it?
- Is it identifiable? Does the difference suggest an action, and the right kind of action? A link suggests going somewhere. A button suggests doing something.
- Is it confirmed? When the user moves the pointer onto it, tabs to it or presses it, does it respond?
The first question concerns appearance, the second concerns convention, and the third concerns feedback. A control that passes all three needs little else.
The squint test
A fast check for the first question is the squint test. Look at the page from a distance, or blur your eyes, or apply a blur filter in developer tools. The things that still stand out are the things your design presents as most important and most interactive.
You can approximate this in the browser. Open developer tools, select the <body> element and add a temporary style.
body {
filter: blur(3px);
}If your main button disappears into the page when blurred, its shape and contrast are too weak. If a heading or a decorative badge stands out as much as the button, users may click the wrong thing. Remove the rule when you are done, since it is only a diagnostic.
Common ways elements fail to look clickable
Several recurring mistakes account for most of the problems you will meet.
- Removing the underline from inline links without a replacement. Designers often remove it for neatness. Unless another cue takes its place, readers lose the link.
- Flat text buttons. A button with no fill, no border and the same color as the text looks like a label.
- Link color too close to text color. A slightly darker shade of gray is not a reliable difference, especially for people with low vision or color-vision differences.
- Non-interactive elements that look interactive. Blue text used for emphasis, tabs that are only headings, or badges styled as buttons train users to doubt every cue on the page.
- Hover as the only signifier. Touch devices have no hover. If the cue appears only on pointer hover, phone and tablet users never see it.
- Cursor as the only signifier. The pointer cursor appears after the user's pointer is already over the element. It confirms, but does not attract.
- Inconsistent styling. If links are blue on one page and gray on another, users cannot learn the rule.
The following callout summarizes the hover problem because it is easy to miss when you test only on a laptop.
Flat design and the cost of subtlety
Flat visual styles removed shadows, gradients and borders from interface elements. The result is clean, but it also removed many signifiers. Studies of eye-tracking and click behavior on flat interfaces have found that users spend longer finding clickable elements and sometimes miss them entirely.
This does not mean you must use heavy shadows. It means you should decide deliberately which cue replaces each one you remove. A flat button can still be a solid fill with generous padding. A flat link can still be underlined. The shape and the label carry the signal when decoration does not.
Do not rely on a single cue
A cue that works for most users can fail for some. Color depends on seeing the difference. Hover depends on a pointer. A shadow can disappear in high-contrast or forced-color modes, where browsers override many author colors and drop shadows. Borders and underlines survive these modes better than shadows or subtle color shifts, because the browser keeps them.
Combining cues gives you redundancy. A link with color and underline still works for a user who cannot tell the colors apart. A button with a fill and a border still has a visible edge in forced-color mode, where the browser may replace the fill but keeps the border. Later chapters on contrast and focus go into the numbers. For now, the working rule is that every interactive element needs at least two independent cues at rest.
Putting the model together
The chart shows why both halves are needed. The correct element gives you the behavior, and the styling gives users a reason to try it. Neither one replaces the other.
Checklist for the rest of this tutorial
Each later chapter refines one part of this model. Keep these working rules in mind as you read.
- Use a real
<a href>or<button>so the affordance exists. - Add at least two signifiers that are visible at rest.
- Make the element respond when the user hovers, focuses or presses it.
- Do not make non-interactive elements look interactive.
- Test without a mouse and with a blurred view of the page.
Exercises
Exercise
A designer styles all inline links with the same color and weight as body text and removes the underline "for a cleaner look". Which part of the affordance and signifier model has failed, and what is the smallest change that fixes it?
Show answer
The links still have the affordance (they work as real links, are focusable and can be activated), but the signifier is gone, so users cannot tell they are clickable. The smallest fix is to restore the underline, or to give the links a distinct color and keep an underline so the cue does not depend on color alone.
Exercise
A page shows a badge labeled "New" in a blue filled rounded rectangle. It is a plain <span> with no behavior. What type of problem is this, and why does it matter beyond that one badge?
Show answer
It is a signifier without an affordance: it looks like a button but does nothing. Users who click it learn that the page's visual cues cannot be trusted, which makes them less likely to try real buttons. Restyle it so it no longer resembles a button, for example by using plain text or a different shape.
Exercise
You test a new link style only on a laptop. The link has no underline and shows an underline and color change only on hover. Why will this likely fail on a phone, and what should you change?
Show answer
Touch screens have no hover state, so phone users never see the underline or color change and the link looks like plain text. Make the underline and distinct color visible at rest, and keep the hover change as extra confirmation.