The first version of anything you build will be wrong in ways you cannot predict. That is not a failure of planning; it is how learning works. The goal is to make those mistakes cheap to discover and cheap to fix.
Common pitfalls
None of this needs fancy tooling. A browser's developer tools, a terminal and a notebook to write down what you tried will get you surprisingly far. The discipline of recording each experiment matters more than the instruments you use.
Tools that help
By the end of the week we had a fix we were proud of, a test that would catch the problem if it ever came back, and a short write-up for the rest of the team. That last part is the one most people skip, and it is often the most valuable.
Documentation does not have to be long to be useful. A short note explaining why a decision was made is worth more than pages describing what the code already says. Future readers can work out the what; the why is the part that gets lost.
Accessibility is easiest when it is part of the design from the start rather than something you bolt on before launch. Semantic HTML does most of the heavy lifting for free, and the remaining work is usually about focus management and clear labels.
- Measure the current state
- Find the single biggest cost
- Fix it and measure again
- Stop when the result is good enough
Programs must be written for people to read, and only incidentally for machines to execute.
Harold Abelson
A better approach
The tempting fix was to add another condition and move on. We had done that before, and the code was already a thicket of special cases that nobody fully understood. This time we decided to step back and ask why the problem was possible in the first place.
- Measure the current state
- Find the single biggest cost
- Fix it and measure again
- Stop when the result is good enough
We shipped the boring version first, and it turned out to be the one we kept.
A team lead we interviewed

What I would do differently
There is no single right answer here, and anyone who tells you otherwise is probably selling something. The right choice depends on your team, your users and how much complexity you are willing to carry for the next few years.
- Use semantic HTML elements wherever possible
- Make sure every interactive element can be reached by keyboard
- Give images meaningful alternative text
- Check colour contrast in both light and dark modes
Programs must be written for people to read, and only incidentally for machines to execute.
Harold Abelson
A good rule of thumb is to measure before you change anything. It is remarkable how often the part of the system you are sure is slow turns out to be fine, while something you never thought about is quietly eating half your budget.