Urgent.News

What's breaking now, across thousands of outlets.

AI

4 Accessibility Mistakes AI Coding Assistants Make, and How to Catch Them

AI coding assistants are good at producing working components quickly. They learned from a huge amount of public code, and public code is full of accessibility mistakes — so the same mistakes come back in generated components, looking clean and passing a quick visual review. Here are four that show up often, the WCAG criterion each one fails, and how to catch them before they merge. 1. A…

AI coding assistants excel at generating functional code swiftly, but they frequently inherit accessibility errors from public code, which can then appear polished and pass superficial visual inspections. Four common accessibility blunders are identified, along with their associated Web Content Accessibility Guidelines (WCAG) criteria and methods for detection before deployment.

1. Clickable div lacking keyboard support: This occurs when users request a clickable card or custom button, resulting in a div with onClick functionality, leading to inaccessibility for keyboard users. The remedy involves using a button element, which is inherently focusable, activates with Enter and Space keys, and is recognized as a button by screen readers.

2. Inaccurate aria-labels: Some assistants add aria-labels to provide additional accessibility context, often using more descriptive phrases than the visible button text. However, this replaces the visible label, causing confusion for users relying on screen readers. The solution is to align the aria-label with the visible text or complement it with descriptive text immediately following the label.

3. Placeholders as labels: Input fields frequently utilize placeholders as labels, which disappear once typed, lack sufficient contrast, and cannot serve as dependable labels. Every input field should be accompanied by a visible, associated label.

4. Removed focus outlines: Some generated CSS resets remove focus outlines entirely, erasing the only visual indication for keyboard users of their position on the page. A better approach is to customize focus styles rather than removing them, ensuring keyboard-focused elements remain clearly visible.

To catch these accessibility issues, multiple strategies can be employed, including using linters, asking the assistant to generate native elements, manually checking keyboard navigation, inspecting the rendered page, and utilizing tools like ADAGuard. While AI assistants can help apply fixes once identified, they cannot verify a component's keyboard accessibility, making testing essential.

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 AI

A quick site hardening pass: email DNS, AI-crawler rules and security headers

Three things go quietly wrong on a lot of small sites: mail that fails authentication, a robots.txt that says something different from what you meant, and missing security headers.

  • Email DNS should include SPF, DKIM, DMARC, and MX records
  • Review robots.txt for AI crawler rules like OpenAI's GPTBot
  • Implement security headers like Strict-Transport-Security

Four big local LLMs on one RTX 5090 and 128 GB of RAM, benchmarked side by side

One RTX 5090, 128 GB of RAM, and four open models from 125B to 748B parameters. Over the past weeks I got each of them running on the same workstation, on three different runtimes.

  • All four models are mixture-of-experts, allowing them to run on a single GPU with limited VRAM.
  • Performance measured by decoding speed, time to first token, prefill speed, and drafting quality.

More from Wednesday 21 October →