SShortSingh.
Back to feed

Biome lint rule falsely flagged accessible SVGs using JSX boolean shorthand

0
·3 views

A bug reported in Biome's noSvgWithoutTitle lint rule caused it to incorrectly flag SVG elements that used the JSX boolean shorthand aria-hidden, despite those elements being properly hidden from the accessibility tree. The root cause was in the Rust source file no_svg_without_title.rs, where the guard checking for aria-hidden called as_static_value(), a helper that first looks for an attribute initializer — the equals-sign-and-value portion of an attribute. Because the bare shorthand aria-hidden carries no initializer, the helper short-circuited and returned None before the 'true' comparison could ever run, causing valid code to be treated as unflagged. The fix was a single line — aria_hidden_attr.initializer()? — which returns early from the rule with no diagnostic the moment it detects a shorthand attribute, while leaving existing behavior for aria-hidden='true' and aria-hidden={true} unchanged. New test cases were added to the rule's spec file to confirm the shorthand and its explicit equivalents all pass validation correctly.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingDEV Community ·

Developer building real-time meeting translation tool shares key engineering lessons

A developer has spent several months building a real-time translation tool for online meetings, initially expecting speech recognition and translation API selection to be the main hurdles. The biggest challenge turned out to be latency, as subtitles appearing even two to three seconds late make the experience feel broken to users. The developer found that translation quality also suffered because spoken language is fragmented and informal, causing even high-performing AI models to struggle when input arrives in partial sentences. This led to rethinking the entire pipeline, including audio capture, incremental speech recognition, buffering strategies, and subtitle rendering. The project highlighted that real-time AI applications require constantly balancing latency, stability, and accuracy — improving one often degrades another.

0
ProgrammingDEV Community ·

mm-gateway Offers a Single Unified API for AI Image, Video, and Music Generation

A developer has released mm-gateway, an open-source Python gateway designed to simplify generative AI integration across multiple providers. The tool supports over 13 backends, including OpenAI, Volcengine, and Mureka, covering image, video, and music generation. It works by routing all requests through a standardized, modality-specific envelope, so provider-specific SDK quirks never surface in application code. Each backend adapter internally translates requests into the native format required by that provider. The project aims to eliminate the need for code rewrites when switching or adding AI providers, making multi-backend setups easier to manage.

0
ProgrammingDEV Community ·

How Docker layer caching works and why instruction order matters in Dockerfiles

Each instruction in a Dockerfile that modifies the filesystem creates a read-only layer, and Docker reuses cached layers during rebuilds as long as inputs remain unchanged. Once any layer changes, all subsequent layers are rebuilt from scratch, making instruction order critical for build performance. A common mistake is copying all source code before installing dependencies, which forces package managers like pip to reinstall on every minor code change. The recommended fix is to copy and install the dependency manifest first, then copy application code, so the slower install step is only re-executed when dependencies actually change. This principle applies broadly across ecosystems, including Node.js, Go, and Ruby projects.

0
ProgrammingDEV Community ·

Gemini 2.5 Flash Cuts Inference Cost by Half While Boosting Code Accuracy

Google's Gemini 2.5 Flash model has launched at half the price of its predecessor, while delivering notable benchmark improvements, including a 9-point jump in code generation accuracy on the FrontierCode benchmark. The cost reduction applies to the same API surface, requiring no configuration changes for teams already using Flash in production. Separately, Z.ai's GLM 5.2, a 1-million-token open-weights model, is now the default on eve agents and available for free via Vercel's AI Gateway until August 27. On the tooling side, the AI SDK's new harness-acp package implements the Agent Client Protocol, allowing a single adapter to work across multiple ACP-compatible agent runtimes instead of requiring separate integrations for each. Together, these releases reflect a broader industry push toward lower inference costs and standardized multi-agent infrastructure.