The user presses "Submit" on a sign-up form, the server takes two seconds to answer, and nothing changes on the screen. They press again, then a third time. You do not have a network problem: you have an interface that does not say what it is doing. Jakob Nielsen's ten usability heuristics are ten questions you can use to find defects of this kind before the people who use the product find them.
The Nielsen Norman Group (NN/g) defines them as ten general principles for interaction design, called "heuristics" because they are broad rules of thumb and not specific usability guidelines. They serve two purposes: guiding your choices while you design and, above all, having several people judge an interface against the same list, which is a heuristic evaluation. Here you read them in the current wording of the official page, see three of them in code that was actually run, and find out where they fall short. The examples are in plain JavaScript, run with Node 24, because the heuristic does not depend on the framework.
Where they come from and what they actually say
Nielsen developed the heuristics together with Rolf Molich in 1990, for the method of heuristic evaluation. Four years later he refined them with a factor analysis of 249 usability problems, aiming at the set with the greatest explanatory power. In 2020 the NN/g updated the page with more explanation and examples, only slightly refining the wording of the definitions: according to Nielsen's note, the ten heuristics have remained unchanged since 1994. The names below are the original English ones from the NN/g page, re-read on 2026-11-13.
- Visibility of System Status
- Match Between the System and the Real World
- User Control and Freedom
- Consistency and Standards
- Error Prevention
- Recognition Rather than Recall
- Flexibility and Efficiency of Use
- Aesthetic and Minimalist Design
- Help Users Recognize, Diagnose, and Recover from Errors
- Help and Documentation
The numbering is there to cite them, not to rank them by importance or by order of work: "we are violating number 3" is a sentence the whole team understands. In practice a real problem often touches more than one item. A confirmation dialog with no "Cancel" violates number 3, and if on top of that it only says "Operation failed" it also violates number 9. So when you note a defect, write down the heuristic that explains it best and move on: the classification is a shared language, not a registry office.
How you use them: heuristic evaluation
According to the NN/g, a heuristic evaluation is a method for identifying design problems in a user interface: evaluators judge the design against a set of heuristics. It can be done with any set; for general usability the NN/g recommends Nielsen's ten. It works on prototypes, physical products, games, virtual reality and voice interfaces, and it helps most early in the process, because it finds likely problems without having to recruit participants.
The point most often forgotten is the number of people. The NN/g explains that each individual evaluator, however experienced, is likely to miss some problems, and that ideally three to five people should independently evaluate the same interface. Independently means that nobody sees the others' notes until they have finished their own. It also pays to narrow the scope: one task at a time, or one section of the site or app, so that the evaluation stays manageable and detailed.
After the collection you assign a severity. Nielsen gives a scale from 0 to 4 and three factors that determine it: the frequency with which the problem occurs, its impact when it occurs, and its persistence, meaning whether the user overcomes it once and for all or is bothered by it every time. To these you add the market impact, because some problems that are "objectively" easy to overcome can still weigh on the popularity of a product.
| Rating | Meaning (Nielsen's scale, as worded by the NN/g) |
|---|---|
| 0 | I don't agree that this is a usability problem at all |
| 1 | Cosmetic problem only: need not be fixed unless extra time is available on project |
| 2 | Minor usability problem: fixing this should be given low priority |
| 3 | Major usability problem: important to fix, so should be given high priority |
| 4 | Usability catastrophe: imperative to fix this before product can be released |
The scale is ordinal: a 4 is not worth "twice" a 2, it only says that it must be fixed before release. That is why it is better to work on the mean of several ratings and not on the rating of one person alone: according to Nielsen, the severity estimated by a single evaluator is too unreliable, and the mean improves quickly as you add ratings. The ratings should be collected after the session, on a complete list of the problems, and always independently.
The script below puts this step into practice on an invented scenario: three evaluators, four problems of a sign-up form, ratings given by each on their own. The lines that matter are the mean function and the sorting: first by descending mean severity, then by identifier, so that when means are equal the order does not depend on the JavaScript engine.
// Invented scenario: three evaluators noted the problems of a sign-up form,
// then each rated the severity (Nielsen's 0-4 scale) on their own.
const problems = [
{ id: 'P1', heuristic: 1, text: 'No sign that the submission is in progress', ratings: [3, 4, 3] },
{ id: 'P2', heuristic: 9, text: 'Error shown as "Invalid data"', ratings: [3, 3, 4] },
{ id: 'P3', heuristic: 8, text: 'Promotional banner above the form', ratings: [1, 2, 1] },
{ id: 'P4', heuristic: 3, text: 'No way to cancel the sign-up', ratings: [2, 4, 3] },
];
const mean = (v) => v.reduce((a, b) => a + b, 0) / v.length;
const ranking = problems
.map((p) => ({ ...p, severity: mean(p.ratings) }))
.sort((a, b) => b.severity - a.severity || a.id.localeCompare(b.id));
for (const p of ranking) {
console.log(`${p.severity.toFixed(2)} ${p.id} (heuristic ${p.heuristic}) ${p.text} ratings=${p.ratings.join('/')}`);
}
// Output:
// 3.33 P1 (heuristic 1) No sign that the submission is in progress ratings=3/4/3
// 3.33 P2 (heuristic 9) Error shown as "Invalid data" ratings=3/3/4
// 3.00 P4 (heuristic 3) No way to cancel the sign-up ratings=2/4/3
// 1.33 P3 (heuristic 8) Promotional banner above the form ratings=1/2/1
The form with no progress indicator (P1) and the one with the generic error (P2) tie above the rest; the banner (P3) stays at the bottom. Look at P4: the ratings 2, 4 and 3 are far apart, and a mean of 3.00 hides the disagreement. When ratings diverge like this, the useful line of the discussion is exactly that one: whoever gave 4 saw a case the others did not consider. The numbers in this example are not a measurement, they only serve to show the calculation.
A heuristic evaluation, the NN/g warns, does not replace research with users: the user experience is highly contextual and to design well you still have to observe real people. It can, however, prepare it, by pointing out the elements to put to the test; how to do that is covered in the article on usability testing with think-aloud and A/B.
Three heuristics in code
Heuristics 1 and 5: the submission that fires five times
Number 1 asks you to tell the user what state the system is in, with feedback as quickly as possible; number 5 asks you to eliminate the conditions that cause errors, or to check for them before the action becomes final. A double click on "Submit" violates both: no feedback, and an action repeated by mistake. The listing isolates the logic in one function: makeSubmitter returns a submit function that, with guard on, rejects calls while the previous one is still pending.
// Heuristics 1 (visibility of system status) and 5 (error prevention):
// a submission still in flight must not be able to start a second time.
function makeSubmitter(post, { guard }) {
let pending = false;
return async function submit(payload) {
if (guard && pending) return { sent: false, reason: 'submission already in progress' };
pending = true; // in a UI, this is where you disable the button and show the status
try {
await post(payload);
return { sent: true };
} finally {
pending = false;
}
};
}
async function simulate(guard) {
let calls = 0;
const fakePost = () => new Promise((resolve) => { calls++; setTimeout(resolve, 20); });
const submit = makeSubmitter(fakePost, { guard });
// five clicks in quick succession, before the response arrives
const results = await Promise.all([1, 2, 3, 4, 5].map(() => submit({ name: 'Ada' })));
return { calls, rejected: results.filter((r) => !r.sent).length };
}
console.log('without guard:', await simulate(false));
console.log('with guard: ', await simulate(true));
// Output:
// without guard: { calls: 5, rejected: 0 }
// with guard: { calls: 1, rejected: 4 }
Without the guard, five clicks in quick succession produce five requests; with the guard one goes out and four are rejected with a readable reason. The finally is not decorative: if you remove that block and the request fails, pending stays true and the form never unlocks again, which means you have solved number 5 and violated numbers 3 and 9. In a real interface, at the line with the comment you disable the button and show the status; here only the logic is tested, because the visual side requires a browser and was not run. The guard in the client does not replace a check on the server: it protects the user from the double click, not the system from a misbehaving client.
Heuristic 3: the emergency exit
The NN/g describes number 3 with the image of emergency exits: users perform actions by mistake and need to leave without an extended process. Among the tips are support for Undo and Redo and a clearly labeled exit, such as a "Cancel" button. The AddressBook class uses the simplest scheme for undoing: every action records its own inverse on a stack, and undo runs the last one.
// Heuristic 3 (user control and freedom): deletion is reversible until it is confirmed.
class AddressBook {
#entries = new Map();
#undo = [];
add(id, name) { this.#entries.set(id, name); }
remove(id) {
if (!this.#entries.has(id)) throw new Error(`entry ${id} does not exist`);
const name = this.#entries.get(id);
this.#entries.delete(id);
this.#undo.push(() => this.#entries.set(id, name)); // every action leaves its inverse
}
undo() {
const inverse = this.#undo.pop();
if (!inverse) return false;
inverse();
return true;
}
get list() { return [...this.#entries.values()]; }
}
const book = new AddressBook();
book.add(1, 'Ada');
book.add(2, 'Grace');
book.remove(2);
console.log('after remove:', book.list);
console.log('undo ->', book.undo(), book.list);
console.log('undo again ->', book.undo(), book.list);
// Output:
// after remove: [ 'Ada' ]
// undo -> true [ 'Ada', 'Grace' ]
// undo again -> false [ 'Ada', 'Grace' ]
The output shows that after remove the entry "Grace" disappears, that undo brings it back, and that a second undo answers false without harm: the empty stack is not an error, it is a case to handle. The scheme holds as long as actions are reversible; for those that are not (an email already sent) heuristic 5 asks for the opposite route, an explicit confirmation beforehand. On a web page the confirmation is built with the <dialog> element:
<dialog id="confirm">
<form method="dialog">
<h2>Delete the entry "Grace"?</h2>
<p>Right afterwards you will be able to undo the deletion.</p>
<button value="cancel" autofocus>Cancel</button>
<button value="delete">Delete</button>
</form>
</dialog>
<script>document.querySelector('#confirm').showModal();</script>
This fragment is a pattern to adapt, not run: it needs a browser. According to MDN, a dialog opened with showModal() also closes with the Esc key; with method="dialog" on the form the buttons close the dialog and their value ends up in returnValue, so the code that opened it knows which choice was made. The autofocus attribute on the "Cancel" button puts the focus on the safe option, and it is MDN's recommendation when no other element involves a more immediate interaction. MDN classifies <dialog> as Baseline "Widely available", meaning available across the main browsers since March 2022.
Heuristic 9: the error message that helps
According to the current wording, error messages should be expressed in plain language (no error codes), precisely indicate the problem, and constructively suggest a solution. "Invalid data" does none of the three. The validatePassword function builds the message from what is really missing: it computes how many characters are needed and checks whether the password contains the first part of the email. The rules are examples, from this test project: a minimum of twelve characters is not a universal recommendation.
// Heuristic 9: plain-language message that states the exact problem and proposes the fix.
const MINIMUM = 12; // example rule of this test project, not a universal recommendation
export function validatePassword(password, email) {
const problems = [];
if (password.length < MINIMUM) {
problems.push(`add ${MINIMUM - password.length} more characters (at least ${MINIMUM} are needed)`);
}
const username = email.split('@')[0].toLowerCase();
if (username.length >= 3 && password.toLowerCase().includes(username)) {
problems.push(`remove "${username}", which is already in your email address`);
}
return problems.length === 0
? { ok: true }
: { ok: false, message: `The password is not accepted: ${problems.join(', and ')}.` };
}
const email = 'ada.lovelace@example.com';
for (const attempt of ['short', 'ada.lovelace-2026', 'horse-battery-staple-clip']) {
const result = validatePassword(attempt, email);
console.log(JSON.stringify(attempt), '->', result.ok ? 'accepted' : result.message);
}
// Output:
// "short" -> The password is not accepted: add 7 more characters (at least 12 are needed).
// "ada.lovelace-2026" -> The password is not accepted: remove "ada.lovelace", which is already in your email address.
// "horse-battery-staple-clip" -> accepted
Each message says what is wrong and what to do: "add 7 more characters" is something the user can verify in a second, while "password too weak" forces them to guess. When there are two problems, the sentence joins them without a list, because a user in difficulty reads one sentence better. The text is only half of the work: the NN/g also recommends a visual treatment that makes the error recognizable, for example bold, red text, and that part depends on your interface.
The other six, in a table
The remaining heuristics are harder to squeeze into a function, but each has a typical violation and a verifiable fix. The examples are mine, built to be concrete; the definitions they are anchored to are the NN/g's.
| Heuristic | Typical violation | What the evaluator looks at |
|---|---|---|
| 2 - Real world | A "Run the rollback" button in an app for shopkeepers | Words and concepts familiar to the user, not internal jargon; a natural and logical order of information |
| 4 - Consistency and standards | Two pages of the same product with "Save" in different positions | Internal consistency (within the product) and external consistency (industry conventions) |
| 6 - Recognition | A field that asks for a code seen three screens earlier | Options and information visible or easily retrievable, without forcing the user to remember |
| 7 - Flexibility | Ten clicks for an action an expert performs every minute | Accelerators such as keyboard shortcuts and gestures, personalization, alternative paths |
| 8 - Minimalism | A promotional banner above the payment form | Every extra piece of information competes with the relevant ones and reduces their visibility |
| 10 - Help | A sixty-page PDF manual, with no search | Searchable help, at the point where it is needed, with concrete steps |
The third column is the one you really use during the evaluation: instead of asking yourself "is it nice?", you ask whether the interface forces people to remember, whether it speaks the language of those who use it, whether an expert can speed up. A practical consequence follows from number 4 for teams: internal consistency is obtained with shared components and values, the subject of the article on the design system with tokens and governance.
Where the heuristics are not enough
Heuristics can conflict. Number 8 asks you to remove what is of little relevance, number 10 to offer help: the sensible composition is to offer help in context, only where the field is ambiguous, as number 6 suggests, instead of a tutorial to memorize. There is no rule that decides for you: you need a real user to understand which of the two weighs more at that point.
A usability checklist is not an accessibility checklist either. Number 3 says that the exit must be clear and reachable, but it does not say how much contrast the button text must have or how it is reached from the keyboard: those are measurable criteria, covered in the article on WCAG 2.1 AA in practice.
Frequently asked questions
Are Nielsen's heuristics still valid?
According to Nielsen's note on the NN/g page, the ten heuristics have remained relevant and unchanged since 1994; in 2020 only the explanations, the examples and, slightly, the wording of the definitions were updated. What changes with technology is the ways of violating them, not the questions.
How many evaluators does a heuristic evaluation need?
The NN/g indicates, ideally, three to five people who evaluate the same interface independently, because each one misses some problems. Each person's notes stay private until everyone has finished, otherwise the evaluators influence one another.
Does a heuristic evaluation replace testing with users?
No. The NN/g presents it as a way to find glaring problems without recruiting participants, useful for stretching a limited research budget, but states that it cannot replace user research. It can prepare the test by showing where to look.
What you can do now
You can cite the ten heuristics by their original name and use them as a shared language in a project review. You can organize a heuristic evaluation the way the NN/g describes it: three to five independent evaluators, a narrow scope, severity on a 0-4 scale collected after the session and averaged. And you have three code patterns, run, for the heuristics where code makes the difference: the submission protected from the double click, the action that can be undone, the error message that says what to do. To try it, pick a single task of your product, for example sign-up, and evaluate it with two colleagues without comparing notes until the end.
In the series, the next step is accessibility according to WCAG; the index is on the series page. If you want a readability check of your texts, there is the Readability Analyzer tool.
Later in the series you will also find prototyping from design to code.
Sources
- Nielsen Norman Group, 10 Usability Heuristics for User Interface Design - current wording of the ten heuristics, Nielsen's note on 1990, 1994 (249 problems) and the 2020 update; page read in full, consulted on 2026-11-13
- Nielsen Norman Group, How to Conduct a Heuristic Evaluation - three to five independent evaluators, narrow scope, limits with respect to research with users; page read in full, consulted on 2026-11-13
- Nielsen Norman Group, Severity Ratings for Usability Problems - 0-4 scale, severity factors, independent ratings and mean across evaluators; page read in full, consulted on 2026-11-13
- MDN Web Docs, the <dialog> element - closing with Esc,
method="dialog"andreturnValue,autofocus, Baseline status; page read in the sections cited, consulted on 2026-11-13 - Nielsen and Molich (1990), "Heuristic evaluation of user interfaces", CHI'90, and Nielsen (1994), "Enhancing the explanatory power of usability heuristics", CHI'94: cited by the NN/g in Nielsen's note, not read directly
Commenti
Caricamento commenti...
Sign in to comment