← All terms

Code Smell

Also known as: Code Anti-Pattern

A characteristic in source code that indicates a potential deeper problem, even if the code technically functions correctly. In accessibility contexts, code smells include patterns like using div or span elements instead of semantic HTML (buttons, headings, nav), inline styles that override user preferences, click handlers on non-interactive elements without keyboard support, and images without alt attributes. AI code generation tools trained on large repositories of human-written code are prone to reproducing these smells, as the training data contains widespread accessibility anti-patterns. Identifying and addressing accessibility-related code smells during development helps prevent barriers from reaching end users.

Category: web development · software engineering

Related: AI Code Generation · Accessibility Violation · Non-Functional Requirement

Sources