Sub topic 17
Writing reproducible discrepancy reports
This chapter assumes you can open browser DevTools, read a design file such as a Figma frame or PDF spec, and have already measured differences between a built page and its design. It covers the last step of a visual QA pass: turning what you found into a report a developer can act on without asking you questions.
Why reports fail
A discrepancy report is a record of one difference between the design and the built page. It is useful only if another person can find the same difference and know what "fixed" looks like.
Most weak reports fail in one of these ways:
- Vague wording. "The header looks off" gives the developer nothing to measure.
- Missing context. The bug appears only at 768px in Safari, but the report does not say so.
- No reference. The report says the spacing is wrong but does not say what the design specifies.
- Several issues in one ticket. A ticket that mixes a font problem with a color problem cannot be closed until both are fixed.
- Opinion instead of evidence. "I think the blue is too light" invites an argument. "The button background is
#4a90d9; the spec tokencolor-primary-600is#2563eb" does not.
Anatomy of a good report
Each report should answer five questions: where, what, expected, actual, and how serious.
| Field | What to write | Example |
|---|---|---|
| Title | Component, property and symptom in one line | Pricing card: title font size is 20px, spec says 24px |
| Environment | Browser and version, OS, viewport width, zoom, pixel density | Chrome 130, macOS, 1280px wide, 100% zoom, 2x display |
| Location | URL, component name, and any state needed | `/pricing`, "Pro" card, default state |
| Steps | The shortest path to see the issue | Open `/pricing`, inspect the "Pro" card heading |
| Expected | The design value with its source | 24px, from the Figma frame "Pricing / Desktop", style `Heading/H3` |
| Actual | The measured value and how you measured it | 20px, from computed style in DevTools |
| Severity | One level from your triage scale | Medium |
| Evidence | Annotated screenshot or overlay | Attached |
The expected and actual fields are the core. Always give both as numbers, colors or named tokens, and always name where each came from.
Make the report reproducible
A report is reproducible when a second person, following only its text, sees what you saw. Three details are most often missing.
Record the environment fully
Visual bugs depend on conditions. Note the browser and version, operating system, viewport width, zoom level and device pixel ratio. If the issue depends on a state, such as a hovered button, an open menu or a validation error, say how to reach that state.
You can capture most of this from the browser console and paste it into the ticket:
console.log({
userAgent: navigator.userAgent,
viewport: `${window.innerWidth}x${window.innerHeight}`,
devicePixelRatio: window.devicePixelRatio,
url: location.href
});Browser zoom changes window.innerWidth and devicePixelRatio, so run this with the same zoom you used when you found the issue.
Capture the measured values
Do not retype values from memory. Read them from the page. The computed style is what the browser actually applied, after all CSS rules and inheritance:
const el = document.querySelector('h1');
const s = getComputedStyle(el);
console.log({
fontFamily: s.fontFamily,
fontSize: s.fontSize,
fontWeight: s.fontWeight,
lineHeight: s.lineHeight,
letterSpacing: s.letterSpacing,
color: s.color
});Paste the output into the ticket next to the design values. A developer can then compare the two lists directly.
Give a stable way to find the element
Say which element you mean. A CSS selector, such as .pricing-card--pro h3, is better than "the big title". Class names can change, so also give the component name and the page URL.
Evidence that helps
A screenshot with no marks forces the reader to search for the problem. Use these rules:
- Crop to the affected component, but include enough surroundings to locate it.
- Mark the problem with a box or arrow in a color that does not appear in the design.
- Show design and build together, either side by side or as an overlay. Label which is which.
- For measurements, show the DevTools box model or a ruler annotation.
- For hover, focus or animation issues, a short screen recording can help, but still write the values in text.
If you take the screenshot from an automated run, the baseline, the new image and the diff image together tell the whole story. Attach all three.
Choose severity consistently
Use the scale from your triage step and apply it the same way every time. A common four-level scale looks like this:
| Severity | Meaning | Example |
|---|---|---|
| Blocker | Breaks use or violates an accessibility requirement | Body text has a 2.5:1 contrast ratio on its background |
| High | Clearly visible to users and off-brand | Primary button uses the wrong color |
| Medium | Noticeable to a careful reviewer | Card padding is 16px instead of 24px |
| Low | Barely visible, no effect on use | Border radius is 7px instead of 8px |
Write the reason beside the level. "High: the button is the main call to action on the landing page" is easier to check than "High".
If you cite a contrast failure, include the computed ratio. This function follows the WCAG formula. Normal body text needs at least 4.5:1 and large text at least 3:1.
function luminance([r, g, b]) {
const lin = (c) => {
c /= 255;
return c <= 0.04045 ? c / 12.92 : Math.pow((c + 0.055) / 1.055, 2.4);
};
return 0.2126 * lin(r) + 0.7152 * lin(g) + 0.0722 * lin(b);
}
function contrastRatio(fg, bg) {
const [hi, lo] = [luminance(fg), luminance(bg)].sort((a, b) => b - a);
return (hi + 0.05) / (lo + 0.05);
}
console.log(contrastRatio([119, 119, 119], [255, 255, 255]).toFixed(2));This prints 4.48, so gray #777777 text on white fails the 4.5:1 threshold for normal text by a small margin. That is a good example of a number a report should quote.
Group, link and deduplicate
One root cause often produces many visible differences. If every card has the wrong padding because a shared class is wrong, file one report that lists the affected components, not twelve reports.
The reverse also holds. Do not combine unrelated problems just because they are on the same page. A useful test is whether one change could fix it and one check could confirm it.
Before filing, search the tracker for existing reports. If one exists, add your environment and evidence to it instead of opening a duplicate.
Track reports through to closure
A report has a life after you file it. A simple set of states is enough:
The verification step matters. The person who found the issue should re-check it in the same environment, because a fix at one width can break another. After a fix ships, re-run any automated screenshot test at the widths you use and update the baseline only when the new image matches the design.
Some differences are not bugs in the build. The design may be unclear, outdated or impossible to implement. Mark these as needing a design decision and tag the designer. Do not guess which side is right.
A complete example
Here is a report written to the structure above.
# Pricing card: heading font size is 20px, design specifies 24px
**Severity:** Medium. Heading is visibly smaller than the design but the card is usable.
**Environment:** Chrome 130 on macOS 14, viewport 1280x900, zoom 100%, devicePixelRatio 2.
**Location:** `/pricing`, "Pro" card, selector `.pricing-card--pro h3`.
**Steps:**
1. Open `/pricing` at 1280px wide.
2. Inspect the "Pro" card heading and read its computed style.
**Expected:** 24px / 32px line height, weight 600. Source: Figma "Pricing / Desktop", text style `Heading/H3`.
**Actual:** 20px / 28px line height, weight 600. Source: DevTools computed style.
**Also affects:** the "Team" and "Starter" cards share this class.
**Evidence:** side-by-side crop attached, heading outlined in magenta.Notice what the report omits: guesses about the cause and instructions on how to code the fix. Describe the difference and the target. The developer knows the code.
Common mistakes
- Using the DevTools "Styles" panel value instead of the computed value. A rule shown there may be overridden.
- Reporting a value at one zoom level and then checking the fix at another.
- Writing "same as design" for a property you did not measure.
- Filing a visual difference that comes from the screenshot, such as scaling or compression, rather than the page.
- Leaving severity blank, which forces the developer to triage your work.
Exercise
You find that the primary button's background is rgb(74, 144, 217) at 1280px in Firefox 131, but the design token color-primary-600 is #2563eb. Write the Expected, Actual and Environment lines of the report. Then say how you would find out whether the same difference appears in Chrome before filing.
Show answer
Expected: #2563eb (token color-primary-600), from the design file's color styles. Actual: rgb(74, 144, 217) (#4a90d9), read from computed background-color in DevTools. Environment: Firefox 131, your OS and version, viewport 1280px wide, zoom 100%, and the device pixel ratio. To check Chrome, open the same URL in Chrome at the same width and zoom, put the button in the same state, and read the computed background-color. If both browsers show the same value, report it as a general issue. If only Firefox differs, say so in the title and note that Chrome matches.
Exercise
A reviewer files twelve tickets, one for each product card that has 16px padding instead of the specified 24px. What is wrong with this, and how should the reports be organized?
Show answer
All twelve cards probably share one cause, such as a single shared class or component. Twelve tickets create duplicate work and make progress hard to track. File one report that names the shared component, lists the affected cards or pages, and gives the expected 24px and actual 16px. If you later find that some cards have a different cause, split those into separate reports.