Sub topic 3
Affordances: what an object allows, and what users perceive it allows
This chapter assumes you know basic HTML and CSS, can recognize common interface controls (buttons, links, inputs, toggles), and have read the earlier chapters on the interaction loop and conceptual models. Here you will separate what an interface can do from what users believe it can do. Most usability failures come from a gap between those two.
What an affordance is
An affordance is a relationship between an object and an actor that makes an action possible. The word comes from the psychologist James Gibson. A chair affords sitting for an adult. It does not afford sitting for a toddler who cannot climb onto it. The affordance exists only when the object's properties and the actor's abilities match.
Three points follow from this definition.
- An affordance is not a property of the object alone. It depends on who is acting.
- An affordance exists whether or not anyone notices it. A door that can be pushed affords pushing even if nobody can tell.
- An affordance says nothing about whether the action is a good idea or whether the user wants it.
In a screen interface, the physical affordances are limited. A flat touchscreen affords touching, swiping, and pinching, whatever is drawn on it. A mouse affords pointing, clicking, and scrolling. A keyboard affords key presses. What an interface adds on top of these is software behavior: the code that responds when you tap a rectangle.
That is why the screen case needs a second idea.
Real affordances and perceived affordances
Donald Norman, who brought the term into design, later noted that designers on screens usually mean something different from Gibson. They mean what the user perceives is possible. This chapter uses two terms to keep the ideas apart.
- A real affordance is an action the system actually supports for the user.
- A perceived affordance is an action the user believes is possible, based on what they see.
Both can be present or absent for any given element. That gives four combinations.
| Real affordance | Perceived affordance | Result | Example |
|---|---|---|---|
| Present | Present | Works as expected | A raised, filled "Save" button that saves |
| Present | Absent | Hidden function | A feature triggered only by a long press, with no cue |
| Absent | Present | False affordance | Underlined text that is not a link |
| Absent | Absent | Correct rejection | Plain body text that does nothing |
The bottom row is fine. The middle two rows are the design problems. A hidden function means users never find a capability you built. A false affordance means users try something, fail, and lose trust in the rest of the screen.
The fix for a hidden function is to add a cue. The fix for a false affordance is either to remove the cue or to make the action real. Cues are the subject of the next chapter, on signifiers. For now, note that a perceived affordance is produced by a signifier, so the two chapters belong together.
Where perceived affordances come from
Users do not read documentation before tapping a screen. They infer possible actions from three sources.
- Appearance. Shape, fill, shadow, border, and color suggest what an element does. A filled rectangle with a shadow looks pressable. A thin box with a cursor inside looks like a place to type.
- Convention. Years of experience with other software teach users patterns. Blue underlined text is a link. A hamburger icon opens navigation. A magnifying glass starts a search. Convention is a learned cultural rule, not a natural fact.
- Context and position. A rectangle at the bottom of a form, right-aligned, labeled "Submit," reads as a button. The same rectangle floating in the middle of a paragraph does not.
Convention is the strongest of the three on screens. This has a practical consequence. If you break a convention, you remove a perceived affordance that users have learned to trust. Breaking convention is sometimes justified, but the cost is that you must teach the replacement.
Flat design and weakened cues
Many modern interfaces removed shadows, borders, and gradients, a style called flat design. The result is that real affordances often lose their visible cues. A "Cancel" action styled as plain gray text next to a heading looks like a label, not like something you can press. Studies of eye tracking and click behavior have repeatedly found that users take longer to identify clickable elements in flat layouts, so the cost is measurable, not just a matter of taste.
Flat style is not wrong. It means the designer must provide the cue some other way, such as with color, position, or an icon.
A worked example in CSS
The following stylesheet makes a button look pressable and then reports its state. Each rule is tied to a specific affordance claim.
.primary {
cursor: pointer;
background: #0b5fff;
color: #fff;
border: 0;
border-radius: 6px;
padding: 0.5rem 1rem;
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}
.primary:hover { background: #0a4fd6; }
.primary:focus-visible { outline: 3px solid #ffbf47; outline-offset: 2px; }
.primary:active { transform: translateY(1px); box-shadow: none; }
.primary:disabled {
background: #c7ccd4;
color: #555;
cursor: not-allowed;
box-shadow: none;
}Read it as a list of claims the interface makes to the user.
- The solid fill, rounded corners, padding, and shadow say "this is a pressable object." The shadow suggests it sits slightly above the surface.
- The
cursor: pointerrule changes the mouse pointer to a hand over the element. This reinforces the claim at the moment the user is about to act. - The hover, focus, and active rules respond to the user's input. They belong more to feedback than to affordance, and a later chapter treats them in that role. Here they matter because they confirm that the element is interactive before the click happens.
- The disabled rule removes the shadow and dulls the color. The perceived affordance is withdrawn at the same moment the real affordance is withdrawn. The two stay in agreement.
That last point is the main lesson of the example. A perceived affordance should track the real one. If a button is disabled in code but looks identical to an enabled one, you have created a false affordance.
Choosing the right element
The most reliable way to get the real affordance right in HTML is to use the element that already carries it. A native <button> gives you keyboard focus, activation with Enter and Space, a role announced by screen readers, and a disabled state, all without extra code.
Compare these two.
<button type="button" class="primary">Save</button>
<div class="primary" onclick="save()">Save</div>The div can be styled to look the same. Visually, the perceived affordance is identical. But the real affordance differs. The div cannot receive keyboard focus by default, does not respond to Space or Enter, and is announced by assistive technology as plain text. A sighted mouse user sees no difference. A keyboard user cannot reach it at all. This is a case where the perceived affordance is present and the real affordance is only partly present.
Affordances for different actors
Because an affordance depends on the actor, the same interface offers different affordances to different people.
- A small tap target affords tapping to a user with a precise stylus but not to a user with a tremor or large fingers. Common guidance sets a minimum target of about 44 by 44 CSS pixels (the WCAG 2.2 minimum is 24 by 24, with larger recommended for touch).
- A hover-only menu affords opening to a mouse user. It affords nothing to a touch user, who has no hover state, and nothing to a keyboard user unless focus also opens it.
- A drag handle affords reordering to someone who can hold and move a pointer. It affords nothing to someone using voice control or a switch device unless an alternative exists, such as "Move up" and "Move down" buttons.
When you audit an element, ask who the actor is. A statement like "this affords dragging" is incomplete until you add "to whom, and with what input device."
Common errors
These are the mistakes that occur most often in real products.
- Clickable things that do not look clickable. Cards, icons, and table rows that respond to clicks but look static. Users never discover them.
- Non-clickable things that look clickable. Underlined headings, blue text used for emphasis, or buttons styled for a state that is not reachable. Users click, nothing happens, and they wonder whether the page is broken.
- Affordances that appear only on hover. Edit and delete icons that show on mouse hover cannot be found on a touch screen.
- Disabled controls that look enabled. The element does not respond, and nothing explains why.
- Disabled controls with no explanation. Even when a disabled button looks disabled, the user may not know what to do to enable it. A short line of text next to it, such as "Fill in your email to continue," solves this.
- Mixed signals. A single screen where primary buttons are filled in one area and outlined in another, so users cannot build a stable rule.
The disabled-control trade-off
Disabling a control is a constraint, which the chapter on constraints covers in detail. It is also an affordance decision, and it has a cost. A disabled button cannot be focused in most browsers, so a keyboard or screen reader user may never learn it exists or why it is unavailable. An alternative is to keep the button enabled and show a message on activation that explains what is missing. This pattern preserves the explanation at the cost of allowing a failed attempt. Neither choice is always right. Choose based on how likely users are to be confused and how costly the failed attempt is.
Testing perceived affordances
You can check perceived affordances without building anything. Three quick methods work well.
- The squint test. Blur your eyes or apply a blur filter to a screenshot. Elements that still look pressable have strong visual cues. Elements that vanish into the background depend on fine detail.
- The five-second test. Show the screen to someone for five seconds. Ask them to list what they think they can do. Compare their list with the real list. Differences show hidden functions and false affordances.
- The first-click test. Give a participant a task, such as "Change your password," and record where they click first. Wrong first clicks identify misleading cues.
Record the results in the table form used earlier: the element, whether the action is real, whether users perceived it, and the resulting category.
Exercise
A product page has a product image that opens a zoomed gallery when clicked. The image has no border, no icon, and no cursor change. The team's analytics show that fewer than 3% of visitors ever open the gallery. Classify the image in the real/perceived affordance table, explain why the analytics result is expected, and propose two fixes.
Show answer
The image has a real affordance (clicking opens the gallery) but no perceived affordance, so it is a hidden function. Users cannot tell the image is interactive, so most never try. Two fixes: add a visible cue such as a small magnifier icon in a corner, and set cursor: zoom-in on hover. Other valid fixes include a "View gallery" text link beneath the image or a visible "1 of 6" counter that implies more images.
Exercise
A form's "Continue" button is disabled with disabled until all fields are valid. It is styled with the same blue fill as the enabled state. Name the problem, and write the CSS rule that fixes the perceived affordance.
Show answer
The problem is a false affordance: the button looks pressable but is not. The fix is a rule that changes the appearance when disabled, for example .primary:disabled { background: #c7ccd4; color: #555; cursor: not-allowed; box-shadow: none; }. It would also help to add text near the button that says what is still required.
Exercise
Why does a hover-only "Delete" icon on a table row fail as an affordance, and for which actors?
Show answer
It makes the action perceivable only to people who use a pointer that can hover. Touch users have no hover state, and keyboard users do not trigger it unless the icon also appears on focus. Fix it by showing the icon at all times, or by revealing it on focus as well as hover, or by adding a row menu button.