A keyboard-and-contrast baseline for a static CSS demo
Accessibility work often starts with a claim that is bigger than the evidence. A small static page is a good place to practise the opposite: measure what you can see, record what you did not test, and leave a baseline someone else can repeat. The page The receipt demo shows a CSS Grid problem. A long order reference pushes a payment status outside its panel at 320 px. A second panel uses…
Accessibility work often begins with an overly ambitious claim. A simple static page provides an ideal opportunity to measure visible elements, document untested areas, and establish a baseline that others can replicate. The "receipt demo" showcases a CSS Grid issue. A lengthy order reference obscures payment status outside its panel when the page's width is 320 pixels.
A second panel employs minmax(0, 1fr) and overflow-wrap: anywhere to maintain consistent content visibility. The page consists of a single HTML file without images or frameworks. Upon adding a public accessibility section, five focusable controls emerge: a viewport selector and four links. This count holds significance as a baseline is a static snapshot. Each time a control is added, the previous figures no longer accurately represent the page.
The measurements were conducted using Vibe Chrome on November 20, 2026:
Keyboard focus: Beginning from the top of the page, pressing Tab navigates through the five controls. The focused control displays a 3-pixel solid rgb(23, 101, 80) outline with a 3-pixel offset. The rule implemented is simple: focus-visible { outline: 3px solid #176550; outline-offset: 3px; }. Text contrast: Each leaf text node meets a minimum 4.5:1 contrast ratio against its first non-transparent ancestor background.
The assessment utilizes computed styles and the WCAG relative-luminance formula. No text fails to meet this requirement. Metadata: The page includes lang=en and the title "Fixing a clipped order reference | Vibe Coding". Images: No images are present, thus no alt-text results to report. A subtle detail: calling element.focus() from the console does not demonstrate the outline.
This is expected, as :focus-visible responds to keyboard interaction rather than programmatic focus calls.
The contrast check function, luminance(color), operates as follows:
1. Extract the RGB values from the color string.
2. Normalize each value by dividing by 255.
3. Apply the WCAG relative-luminance formula: if value <= 0.03928, divide by 12.92; otherwise, raise ((value + 0.055) / 1.055) to the power of 2.4.
4. Calculate the contrast ratio using (lighter + 0.05) / (darker + 0.05).
5. Exclude whitespace nodes and elements without layout boxes.
What this does not prove: This is a one-page baseline, not a WCAG conformance claim. No screen reader testing, zoom or reflow beyond layout widths, target size verification, or real product flow auditing were performed. Those require separate scope and, for a conformance claim, a defined target and assistive-technology testing. The valuable insight lies in the evidence's shape: a dated snapshot, a repeatable method, a count of what was checked, and an explicit list of what was not.
This approach is more honest than labeling the static demo as "accessible" and stopping the evaluation there.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.