HCI and accessibility
Introduit
6:03
Génie logiciel
Software engineering is how systems outlive their authors. The first three units shape the product: requirements, architecture and interface design. The next…
Narration en anglais · sous-titres en anglais et en 中文 au choix
Dans cette leçon
| English | Sens |
|---|---|
| states/steɪts/ | états |
| transitions/trænˈsɪʃnz/ | moves from one state to another in a state machine or user interface |
| Accessibility/ækˌsesəˈbɪlɪti/ | making software usable by people with disabilities |
| contrast/ˈkɒntræst/ | the difference in brightness between text and its background |
| Fitts's law/ˈfɪtsɪz lɔː/ | the time to reach a target grows with its distance and shrinks with its size |
| Heuristic evaluation/hjuːˈrɪstɪk ɪˌvæljuːˈeɪʃn/ | Three to five reviewers each walk through the flow with a short checklist (show the status, use the user's words, allow undo, be consistent, prevent errors), then they combine their findings. |
| severity/səˈverɪti/ | how serious a usability problem is for users |
Design in states
- The borrow flow has five states 状态 (browsing, detail, confirm, done, error) and labelled transitions 转换.
- Every state the user can reach needs a visible way out. The error state keeps what the member typed and returns to the detail page.

Every reachable interface state needs —
Difficulté 1/5 · 100 pièces + un petit bonus lors de la première réussite aujourd'hui
No exit = a trap; the error state returns to detail with input kept.
Accessibility you can measure
- The core of WCAG (the web accessibility guidelines): perceivable (text contrast 对比度 at least $4.5{:}1$), operable (every control reachable by keyboard, focus visible), understandable (labels, not placeholders) and robust (correct structure in the code).
- The course prototype, measured: body text at 7:1 passes. A grey button that only looked disabled (it could still be clicked) was at 2.9:1 and failed; really disabled controls are exempt. It was replaced by 4.6:1 with an underline. Accessibility 无障碍 must be measured, or it is only decoration.
Text contrast must be at least —
Difficulté 1/5 · 100 pièces + un petit bonus lors de la première réussite aujourd'hui
WCAG AA: 4.5:1 for body text; 7:1 comfortably passes.
A grey button label with contrast $2.9{:}1$ meets WCAG's text contrast rule.
Difficulté 1/5 · 100 pièces + un petit bonus lors de la première réussite aujourd'hui
Normal text needs at least $4.5{:}1$. The prototype replaced it with a $4.6{:}1$ colour and an underline, so the affordance does not rely on colour alone.
The keyboard path
- A member completes a borrow with Tab and Enter only: the focus order matches the visual order, focus is visible on every control, and screen readers announce the confirmation. Menus that open only on hover fail this path, and the test finds them before users do.
- Error states 状态 that throw away input, and placeholders used as labels, are the faults that keep coming back.
The keyboard path fails when —
Difficulté 1/5 · 100 pièces + un petit bonus lors de la première réussite aujourd'hui
Hover-only affordances are unreachable by tab.
Testing with users, and Fitts's law
- A small test finds most problems. If one user meets a given problem with probability $0.31$, five users find $1 - 0.69^5 \approx 84\%$ of them. Several small rounds beat one big one, because each fix uncovers the next problem.
- Fitts's law 菲茨定律 prices pointing: the time grows with $\log_2(D/W + 1)$ for distance $D$ and target width $W$. A $16$ px button $512$ px away scores $\log_2 33 \approx 5.0$ bits; doubling its width cuts that to $\log_2 17 \approx 4.1$. Big, near targets are fast targets.
Each user finds a given problem with probability 0.31. What percentage of problems do 3 users find? (Answer to the nearest whole number.)
Difficulté 2/5 · 140 pièces + un petit bonus lors de la première réussite aujourd'hui
1 - 0.69^3 = 1 - 0.329 = 0.671, about 67%.
A target is 1 px wide and 255 px away. What is its Fitts index of difficulty, log2(D/W + 1), in bits?
Difficulté 2/5 · 140 pièces + un petit bonus lors de la première réussite aujourd'hui
log2(255 + 1) = log2 256 = 8 bits.
Expert review before users
- Heuristic evaluation 启发式评估: three to five reviewers each walk through the flow with a short checklist (show the status, use the user's words, allow undo, be consistent, prevent errors), then they combine their findings.
- Each problem gets a severity 严重程度 from 0 (not a problem) to 4 (blocks the task). Fix the 4s before testing with users, so that users can find what experts cannot.
In heuristic evaluation, a severity-4 problem can wait until after user testing.
Difficulté 1/5 · 100 pièces + un petit bonus lors de la première réussite aujourd'hui
Severity 4 blocks the task; fix it first so testing finds new problems.
Worked example: computing a contrast ratio
- WCAG contrast 对比度 is $(L_1 + 0.05)/(L_2 + 0.05)$, using relative luminances with the lighter colour on top. White ($L = 1$) on a grey with $L = 0.18$ gives $1.05/0.23 = \mathbf{4.57}$: just above the 4.5 needed for body text.
- A slightly lighter grey, $L = 0.20$, sits closer to white: $1.05/0.25 = 4.2$, which fails. Black on white is the maximum, $1.05/0.05 = 21$.
White text ($L = 1$) on a background of $L = 0.20$: contrast ratio (one decimal)?
Difficulté 2/5 · 140 pièces + un petit bonus lors de la première réussite aujourd'hui
$1.05/0.25 = 4.2$.
Contrast ratio of black on white?
Difficulté 2/5 · 140 pièces + un petit bonus lors de la première réussite aujourd'hui
$(1 + 0.05)/(0 + 0.05) = 21$.
Worked example: review the borrow form
- (Fictional) An expert review of the first borrow form found four problems. Give each a severity 严重程度 (0 to 4) and a fix.
| Severity: problem | Fix |
|---|---|
| 3: a field labelled only by a placeholder | a visible label above it |
| 4: an error clears the whole form | keep the input; point at the field |
| 4: "Borrow" opens only on mouse hover | a real button that Tab and Enter reach |
| 2: due date shown in red only | add the words "Due today" |
- Fix the two 4s first: each one stops some members from borrowing at all. Then test with five users.
Marks that slip away
- Placeholder as label. It disappears as soon as the user types.
- Errors that throw input away. Keep what the user entered and point at the field to fix.
- Meaning by colour alone. The $2.9{:}1$ grey button failed; add text or an underline.
Recap
- Design in states, and give every reachable state a visible way out.
- WCAG: text contrast at least $4.5{:}1$; everything reachable by keyboard; labels, not placeholders.
- Measure accessibility 无障碍: $2.9{:}1$ fails, $4.6{:}1$ passes.
Que s’est-il passé ? Seule l’équipe du site voit ces informations.