Sub topic 2
Turn the flow into screens and states
This chapter assumes you have a mapped user flow (a list of steps from start to goal), basic HTML, and a browser. Each step in the flow becomes one screen, and some screens have more than one state.
Screens and states
A screen is one distinct view the participant sees. A state is a version of a screen that differs by content or condition, such as empty, loading, or error. Build the states that affect the test question, and skip the rest.
| Flow step | Screen | States to build |
|---|---|---|
| Enter trip details | Home | Default |
| See options | Results | Populated, no matches |
| Pick an option | Detail | Default |
Wire up hotspots and navigation
A hotspot is a clickable area that moves the participant to another screen. In HTML, a data-goto attribute on a button names the target screen. One short script shows the target and hides the rest:
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Trip planner</title>
</head>
<body>
<section id="home" class="screen">
<h1>Plan a weekend trip</h1>
<button data-goto="results">Search</button>
</section>
<section id="results" class="screen" hidden>
<h1>3 trips found</h1>
<button data-goto="detail">Lisbon, 2 nights</button>
<button data-goto="home">Back</button>
</section>
<section id="detail" class="screen" hidden>
<h1>Lisbon, 2 nights</h1>
<button data-goto="home">Start over</button>
</section>
<script>
function show(id) {
document.querySelectorAll('.screen').forEach(function (s) {
s.hidden = s.id !== id;
});
}
document.addEventListener('click', function (e) {
const link = e.target.closest('[data-goto]');
if (link) show(link.dataset.goto);
});
</script>
</body>
</html>Every hotspot should lead somewhere real. A dead button ends the test early and tells you nothing about the idea.
Use realistic content
Placeholder text such as "Lorem ipsum" or "Item 1" makes participants read less carefully and react differently. Use plausible names, prices, dates, and counts. Realistic content lets participants react the way they would with a real product.
Write tasks, not instructions
A task gives a goal and a scenario. An instruction names the interface element to click. Tasks reveal whether the flow makes sense to the participant. Instructions only show whether the participant can follow directions.
- Task: "You have a free weekend next month and about 300 euros. Find a trip you would book."
- Instruction, to avoid: "Click Search, then pick Lisbon."
Define success before the session starts, such as reaching the detail screen without help.
Exercise
Exercise
In the prototype above, which button leads from the Results screen to the Detail screen, and what attribute does it use?
Show answer
The "Lisbon, 2 nights" button. It uses the data-goto attribute with the value "detail".