Move Focus to the First Invalid Form Field
When a visitor submits a form with missing or invalid fields, moves keyboard focus to the first problem field and announces the browser's error message to screen readers.
Snippet Library
Snippets that make WordPress easier for everyone to use: skip links, focus styles, better link text and fixes for common accessibility issues. For site owners who want a site that works with keyboards and screen readers.
When a visitor submits a form with missing or invalid fields, moves keyboard focus to the first problem field and announces the browser's error message to screen readers.
Gives links in your content whose only content is an image with empty alt text an accessible name, using the title of the page they point to, so screen readers no longer announce just the URL.
Shows the first frame of every animated GIF in your content with a play button, and only plays the animation when the visitor clicks, so moving images never start on their own.
Adds a visible pause/play button to every auto-rotating Swiper slider on the page (used by many themes, Elementor and slider plugins) and stops them automatically for visitors who prefer reduced motion.
Shows a panel in the block editor's pre-publish check listing every image block that has no alternative text, with a button to jump to each one.
When a product image in the shop, on category pages or on the product page has no alternative text, uses the product name instead of leaving it empty.
Adds a "Readability" panel to the block editor sidebar with the word count, average sentence length, number of very long sentences and a Flesch reading ease score that updates as you write.
Removes the title attribute from images in your content when it is the same as the alt text, so screen readers do not read the same description twice.
Adds a small set of keyboard skip links (main content, main menu, search and footer) that appear on the first Tab press. Links whose target is missing on a page are removed automatically.
Turns sticky and fixed headers into normal headers when the visible screen area is very small, such as at 400% browser zoom or on landscape phones, so they no longer cover most of the content.
For image blocks that have a caption but no alternative text, uses the caption text as the alt attribute, so the image is not announced as unlabeled.
When a featured image has no alternative text, outputs the post title as its alt attribute in themes and blocks, instead of leaving it empty.
Adds a "wp a11y-scan" command that checks published posts and pages for images without alt text, empty links, iframes without titles, positive tabindex and skipped heading levels, and prints a table you can export.