Rules · a11y/*
Accessibility rules
WCAG 2.2 AA through axe-core, plus checks axe can't do alone: visible keyboard focus, 24/44px target size on mobile, 320px reflow and disabled zoom.
$ void a11y48 rules30 error · 17 warn · 1 infoupdated 16 Sept 2026
- a11y/color-contrasterrorText has insufficient color contrastLow-contrast text is unreadable for people with low vision and for everyone in sunlight. WCAG AA needs 4.5:1 for body text and 3:1 for large text.
- a11y/image-alterrorImage has no text alternativeScreen readers announce the file name or nothing at all, so the content or purpose of the image is lost.
- a11y/button-nameerrorButton has no accessible nameIcon-only buttons without a label are announced as just "button", so screen-reader users cannot tell what they do.
- a11y/link-nameerrorLink has no accessible nameLinks without discernible text (e.g. icon links) are announced only as "link".
- a11y/labelerrorForm field has no labelWithout a programmatic label, assistive tech cannot say what to type and clicking the label won't focus the field.
- a11y/select-nameerrorSelect element has no accessible nameWithout a label, screen readers announce only the current option, so users cannot tell what the dropdown is for.
- a11y/input-button-nameerrorInput button has no accessible name<input type=button|submit|reset> without a value or label is announced as an unnamed button, so its action is unknown.
- a11y/input-image-alterrorImage button has no alt textAn image button without alt text is announced by its file name or not at all, so screen-reader users cannot tell what it submits.
- a11y/html-has-langerror<html> has no lang attributeScreen readers pick pronunciation rules from lang; without it text may be read in the wrong language. Translation tools also rely on it.
- a11y/html-lang-validerror<html lang> is not a valid language tagScreen readers and translation tools ignore an invalid lang value and fall back to the user's default language, mispronouncing the content.
- a11y/document-titleerrorPage has no <title>The title is the first thing screen readers announce and what appears in tabs, history and search results.
- a11y/landmark-one-mainwarnPage has no <main> landmarkLandmarks let keyboard and screen-reader users jump straight to the content.
- a11y/regionwarnContent is outside landmark regionsContent not inside header/nav/main/footer landmarks is easy to miss when navigating by landmarks.
- a11y/landmark-uniqueinfoLandmarks are not uniquely identifiableWhen a page has several nav or aside landmarks with no label, the landmark list shows identical entries and users cannot tell them apart.
- a11y/page-has-heading-onewarnPage has no level-one headingScreen-reader users commonly jump to the h1 to find the start of the content; search engines use it too.
- a11y/heading-orderwarnHeading levels skipSkipping from h2 to h4 breaks the document outline that assistive technology exposes.
- a11y/empty-headingwarnHeading is emptyEmpty headings appear as blank entries in the screen-reader heading list, which breaks navigation by headings.
- a11y/listwarnList contains invalid childrenA <ul>/<ol> may contain only <li> (plus script/template). Other children break list semantics, so screen readers announce the wrong item count.
- a11y/listitemwarn<li> is not inside a listAn <li> outside a list is not announced as a list item, so users lose the item count and grouping.
- a11y/aria-allowed-attrerrorARIA attribute is not allowed on this roleUnsupported ARIA attributes are ignored or cause contradictory announcements.
- a11y/aria-required-attrerrorRequired ARIA attribute is missingRoles like slider or checkbox need state attributes to be operable with assistive tech.
- a11y/aria-required-childrenerrorARIA role is missing required childrenComposite widgets (list, menu, tablist) need their owned roles to work.
- a11y/aria-required-parenterrorARIA role is missing its required parentItems like tab or menuitem only make sense inside their container role.
- a11y/aria-roleserrorInvalid ARIA roleBrowsers ignore misspelled or invented role values, so the element exposes its native semantics instead of the widget you intended.
- a11y/aria-valid-attrerrorInvalid ARIA attribute nameBrowsers ignore misspelled aria-* attributes (aria-labeledby, aria-role), so the label or state never reaches assistive technology.
- a11y/aria-valid-attr-valueerrorInvalid ARIA attribute valueInvalid values (e.g. aria-expanded="yes", aria-controls pointing at nothing) are ignored or misannounced.
- a11y/aria-hidden-focuserrorFocusable element inside aria-hiddenKeyboard users can focus something that screen readers claim does not exist.
- a11y/aria-hidden-bodyerroraria-hidden on <body>aria-hidden="true" on <body> hides the entire page from screen readers, often left behind by a modal library that failed to clean up.
- a11y/aria-command-nameerrorARIA button/link/menuitem has no accessible nameElements with role button, link or menuitem that have no text are announced only by their role, so users cannot tell what they do.
- a11y/aria-input-field-nameerrorARIA input field has no accessible nameCustom inputs (combobox, listbox, searchbox, slider, spinbutton, textbox) without a name are announced with no purpose.
- a11y/aria-toggle-field-nameerrorARIA toggle has no accessible nameCustom checkbox, radio, switch and menuitemcheckbox elements without a name are announced only as "checkbox, not checked" with no subject.
- a11y/aria-prohibited-attrwarnARIA attribute is prohibited for this roleSome roles prohibit naming. For example, aria-label on a generic <div> or <span> is ignored by most screen readers, so the text you expected users to hear is never announced.
- a11y/nested-interactiveerrorInteractive controls are nestedA button inside a link (or similar) confuses focus order and screen-reader announcements.
- a11y/duplicate-id-ariaerrorDuplicate id referenced by ARIAWhen several elements share an id, aria-labelledby, aria-describedby and aria-controls resolve to the first match only, so controls get the wrong label.
- a11y/frame-titlewarn<iframe> has no titleScreen readers announce an iframe by its title. Without one, users hear only "frame" and cannot tell a video, map or ad apart from content.
- a11y/svg-img-alterrorSVG image has no text alternativeAn <svg role="img"> with no accessible name is announced as an unlabeled image, so the information in the graphic is lost.
- a11y/role-img-alterrorrole="img" element has no text alternativeElements with role="img" (icon spans, CSS background images) have no alt attribute, so without a name they are announced as unlabeled images.
- a11y/tabindexwarnPositive tabindextabindex > 0 overrides the natural focus order and almost always creates a confusing order.
- a11y/scrollable-region-focusablewarnScrollable region is not keyboard accessibleA scrollable container with no focusable content cannot be scrolled with the keyboard, which hides overflowed content from keyboard users.
- a11y/link-in-text-blockwarnLinks in text are distinguished only by colorIf links inside a paragraph differ from the text only by color, people with low vision or color blindness cannot find them (WCAG 1.4.1).
- a11y/autocomplete-validwarnInvalid autocomplete valueCorrect autocomplete tokens let browsers and assistive tech fill fields.
- a11y/meta-viewporterrorZooming is disableduser-scalable=no or maximum-scale < 2 stops low-vision users from pinch-zooming (WCAG 1.4.4).
- a11y/bypasswarnNo way to skip repeated contentWithout a skip link or landmarks, keyboard users must tab through the entire header and navigation on every page before they reach the content.
- a11y/video-captionerrorVideo has no captionsDeaf and hard-of-hearing users miss everything said in a video without captions. Captions also serve anyone watching with the sound off.
- a11y/axe-otherwarnOther axe-core accessibility violationaxe-core found a WCAG or best-practice violation that void does not have a dedicated rule page for.
- a11y/target-sizewarnTouch target is smaller than 24×24 pxSmall targets are hard to hit for people with motor impairments and for everyone on a phone (WCAG 2.5.8 requires 24×24 CSS px; 44px is the comfortable size).
- a11y/focus-not-visibleerrorKeyboard focus is not visibleKeyboard and switch users need to see where focus is. Removing the outline without a replacement makes the site unusable without a mouse (WCAG 2.4.7).
- a11y/reflow-overflowwarnContent overflows horizontally at 320pxWCAG 1.4.10 requires content to reflow at 320 CSS px (equivalent to 400% zoom) without horizontal scrolling; overflow also breaks mobile layouts.