{
  "id": 20801758,
  "title": "A keyboard-and-contrast baseline for a static CSS demo",
  "url": "https://urgent.news/2026/11/19/a-keyboard-and-contrast-baseline-for-a-static-css-demo",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-11-19T20:54:38.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/vibecodingbyice/a-keyboard-and-contrast-baseline-for-a-static-css-demo-2nmj"
  },
  "original_language": "en",
  "account": "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.\n\nThe measurements were conducted using Vibe Chrome on November 20, 2026:\n\nKeyboard 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.\n\nThe contrast check function, luminance(color), operates as follows:\n1. Extract the RGB values from the color string.\n2. Normalize each value by dividing by 255.\n3. 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.\n4. Calculate the contrast ratio using (lighter + 0.05) / (darker + 0.05).\n5. Exclude whitespace nodes and elements without layout boxes.\n\nWhat 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.",
  "summary": "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…",
  "key_points": [
    "Five focusable controls emerge after adding accessibility section",
    "Keyboard navigation through controls via Tab key",
    "Text contrast meets minimum 4.5:1 ratio for all leaf text nodes"
  ],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}