Sub topic 8
Flexibility and efficiency of use
This chapter assumes you know the first six heuristics from the earlier chapters, especially recognition rather than recall. You should also be comfortable reading short HTML and JavaScript. The code is optional for understanding the idea, but it shows how small the implementation can be.
What the heuristic says
Nielsen's seventh heuristic reads, in short: shortcuts, hidden from novices, may speed up the interaction for expert users, so that the design serves both inexperienced and experienced users. The design should also let users tailor frequent actions.
The heuristic follows from the previous one. Recognition rather than recall favors visible menus, labels, and prompts. Those aids suit a first visit, but they become a tax on the hundredth visit. A user who opens File, then Export, then PDF forty times a day wants a faster route. Flexibility and efficiency of use asks you to keep the visible route and add faster ones next to it.
Three ideas sit inside the heuristic:
- Accelerators are faster ways to run an action that a novice does not need to know about.
- Customization lets users change the interface to match what they do often.
- Multiple paths let one task be done by more than one method, such as a mouse, a keyboard, or a voice command.
Accelerators
An accelerator is any control that shortens a sequence you could also do the long way. The long way must stay available. If the shortcut is the only route, you have broken recognition rather than recall instead of extending it.
| Accelerator | Slow path it replaces | Typical product |
|---|---|---|
| Keyboard shortcut (Ctrl+S) | Menu, then Save | Almost every desktop app |
| Command palette | Hunting through menus and settings | Code editors, design tools |
| Type-ahead and autocomplete | Typing the whole value | Search boxes, address fields |
| Bulk actions (select all, multi-select) | Repeating an action per item | Email, file managers |
| Templates and saved presets | Re-entering the same settings | Report builders, forms |
| Touch gestures (swipe to archive) | Open item, then tap Archive | Mobile mail clients |
| Command-line flags and aliases | Interactive prompts | Developer tools |
Good accelerators share one trait: the interface teaches them in passing. A menu item that shows Ctrl+S beside the label lets a novice learn the shortcut while using the slow path. A tooltip on a toolbar button can name its key. A palette entry can list the shortcut next to the command. This turns the slow path into a training path, so users move to the fast path at their own pace.
A working example: shortcuts that teach themselves
The page below has a Save button that shows its shortcut. It also has a search field you can reach by pressing /, a convention many sites use. The script ignores single-key shortcuts while the user types in a text field. Skipping that check is a common bug, because the user then cannot type the character / into a form.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Shortcut demo</title>
</head>
<body>
<label for="search">Search notes</label>
<input id="search" type="search" placeholder="Press / to focus">
<button id="save" type="button" aria-keyshortcuts="Control+S">
Save <kbd>Ctrl+S</kbd>
</button>
<p id="status" role="status">Not saved yet.</p>
<script>
const search = document.getElementById("search");
const save = document.getElementById("save");
const status = document.getElementById("status");
function saveNote() {
status.textContent = "Saved at " + new Date().toLocaleTimeString();
}
save.addEventListener("click", saveNote);
document.addEventListener("keydown", function (event) {
const typing = ["INPUT", "TEXTAREA", "SELECT"].includes(event.target.tagName)
|| event.target.isContentEditable;
// Modifier shortcut: works even while typing, so it must not clash with typing.
if ((event.ctrlKey || event.metaKey) && event.key.toLowerCase() === "s") {
event.preventDefault();
saveNote();
return;
}
// Single-key shortcut: only when the user is not typing.
if (event.key === "/" && !typing) {
event.preventDefault();
search.focus();
}
});
</script>
</body>
</html>Several details matter here:
- The button is a real
button, so mouse and keyboard users get the slow path by default. <kbd>shows the shortcut in the label. This is the teaching step.aria-keyshortcutstells assistive technology which key activates the control. It documents the shortcut and does not create it, so the script still has to handle the key.event.preventDefault()stops the browser from opening its own Save dialog.event.metaKeycovers the Command key on macOS.- The
role="status"paragraph also keeps this page consistent with visibility of system status.
Customization
The second half of the heuristic is tailoring. Users repeat different tasks, so a fixed layout favors the average user, who does not exist. Common forms of customization include:
- Pinning or favoriting frequent items, such as starred folders or a pinned chat.
- Reordering or hiding toolbar buttons.
- Remembering recent items, recent searches, and last-used settings.
- Letting users save a filter or a search as a named view.
- Remapping keyboard shortcuts.
Customization has a cost. Each option adds a decision for the user and a state to test for the team. Prefer adaptive defaults over settings pages. A "Recent files" list requires no configuration, and a settings panel with forty toggles does.
Common errors
Shortcuts with no discovery. A shortcut that nobody can find helps only people who read the manual. Show it in menus, tooltips, and the command palette.
Removing the slow path. Some redesigns replace menus with gestures or hidden controls and call the result "clean". Novices lose the way in. This also trades against recognition rather than recall and against aesthetic and minimalist design when used as an excuse to hide features.
Clashing with the platform. Overriding Ctrl+W, Ctrl+T, or Ctrl+L in a web page fights the browser and breaks the consistency and standards heuristic. Do not take over keys that users already depend on, and check that your shortcuts do not collide with screen reader or operating system commands.
Single-key shortcuts that fire while typing. The example above guards against this. WCAG 2.1 success criterion 2.1.4 (Character Key Shortcuts) also requires that single-character shortcuts can be turned off, remapped, or active only on focus.
Shortcuts that act without a safety net. A fast delete key is a hazard if it has no undo. Pair accelerators with the control and freedom you saw in heuristic three. A fast action that is easy to reverse is safe.
Efficiency for experts that excludes people. Drag-only or hover-only paths fail users who cannot use a mouse. Every accelerator needs a path that works with the keyboard, and the keyboard path must not depend on remembering a hidden gesture.
Edge cases
Expert users are not one group. A person may be an expert in the invoicing screen and a novice in the reports screen of the same product. Do not gate accelerators behind an "expert mode" switch unless the switch is easy to find and reversible. Plain coexistence of the slow and fast paths is usually better.
Frequency decides what deserves an accelerator. Measure which actions are repeated and place accelerators there. An accelerator for a once-a-year action is clutter, which hurts the next heuristic, aesthetic and minimalist design.
Accelerators also differ by input device. A swipe gesture on a phone has no keyboard counterpart, so the phone needs a visible button alongside it. A hover preview on a laptop has no touch equivalent, so it must not be the only way to see the information.
Finally, an accelerator that depends on locale can fail. Shortcuts built on letters that sit in different places on non-QWERTY layouts, or that conflict with an input method editor, may be unusable for some users. When you can, use event.code for position-based shortcuts and event.key for character-based ones, and test with at least one other layout.
Evaluating this heuristic
In a heuristic evaluation, check the following for each core task:
- Is there a faster path for a task done many times a day?
- Does the interface show the faster path to someone using the slow one?
- Can users save, favorite, or reuse their common settings?
- Do shortcuts avoid conflicts with browser, operating system, and assistive technology keys?
- Does every accelerator have a keyboard-accessible route and a reversible result?
Findings are usually moderate in severity. A missing shortcut slows people without blocking them, so it often rates lower than a misleading error message. The exception is a task that experts repeat hundreds of times, such as a support agent entering tickets. For that user, a missing accelerator costs hours each week, and you should rate it higher.
Exercise
A project-management app lets users reach "Create task" only by opening the sidebar, choosing a project, and pressing the plus button. Power users create 50 tasks a day. Name the heuristic involved, then propose two accelerators that keep the existing path intact and one thing to check before shipping them.
Show answer
The heuristic is flexibility and efficiency of use. Two accelerators: a keyboard shortcut such as pressing C anywhere in the app to open a quick-add dialog, and a quick-add field at the top of the task list that accepts a title and creates the task on Enter. The sidebar and plus button stay in place for novices, and the plus button's tooltip can show the shortcut so users learn it. Before shipping, check that single-character shortcuts do not fire while the user types in a text field, that they do not collide with browser or screen reader keys, that users can turn them off or remap them, and that a created task can be undone.