Urgent.News

What's breaking now, across thousands of outlets.

Tech

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.

Read the original at dev.to →

More in Tech

Checking Broken URLs After a Site Migration — a small on-demand tool

Checking Broken URLs After a Site Migration — a Small On-Demand Tool Migrations move URLs. A redirect map that looks complete in a spreadsheet can still produce 404s, redirect loops, or unresolved hosts once the new site is live. The annoying part is that you often find out from Search Console days later.

  • Tool checks URLs after migration without crawling or alerts
  • Accepts up to 200 URLs per run with customizable settings
  • Outputs status, final URL, redirect chain, and elapsed time

How I Built a 100% Client-Side PDF Powerhouse with WebAssembly and React (Zero Cloud Uploads)

Why Does Every Online PDF Tool Want Your Credit Card and Your Tax Returns? Earlier this month, I had to upload a signed certificate to a government application portal. The portal had one strict requirement: "Uploaded PDF must be strictly below 100 KB." I did what everyone does: searched "compress PDF under 100kb" on Google.

  • Reporter frustrated with online PDF tools requiring credit card info and remote uploads
  • Developed PDFCraft, zero-server alternative operating entirely on client device
  • PDFCraft compresses PDF files under 100KB using WebAssembly, HTML5 Canvas, and pdf-lib

More from Thursday 19 November →