DocumentationFixing

Site-wide fixes

Fourteen switches that supply what a theme leaves out, each one honest about what it might disturb.

Some accessibility faults are not on a page, they are in the theme, and they repeat everywhere. Fixing those one finding at a time is wasted effort.

Site-wide fixes are switches. Each one supplies something a theme commonly leaves out, across the whole site at once. None of them is on by default.

Before you switch one on

Every fix says what it might disturb, because some of them change behaviour rather than only appearance. Read the caveat. The plugin shows it beside the switch for the same reason it is printed here.

A fix that changes what a form does, or stops an upload, is a policy decision about your site, and that is yours to make rather than ours to make for you.

The fourteen

Do not allow PDF uploads

block-pdf-uploads

Stops anyone but an administrator adding a PDF to the media library, and explains why when it happens. A PDF is a separate document with its own accessibility, which nothing here can inspect or repair — the same content published as a page is accessible by default. This is a policy, not a repair, so it changes nothing already on your site.

What it might disturb. Administrators can still upload PDFs, because anybody who can install a plugin can put a file wherever they like and pretending otherwise would only make this look broken. PDFs already in your media library are untouched, and existing links to them keep working.

Label the search and comment fields

comment-search-labels

Gives your search box and comment fields a name where the theme left them without one. An unlabelled field is announced as "edit, blank" — the reader can tell there is something to type in, and nothing about what belongs there. Nothing moves on screen; the names are added for assistive technology only.

What it might disturb. Covers WordPress's own search and comment forms. Forms built by a plugin — contact forms, checkouts, newsletter sign-ups — are not reached by this and have to be labelled where they are built.

Name the format of linked files

download-file-info

Adds "(PDF, 1.2 MB)" after links in your content that point at a document rather than a page, so the reader knows a download is coming before they commit to it. The size is included when the file is in your media library.

What it might disturb. Covers links inside post and page content, not links your theme prints. Links that already name their format are left alone. The file size only appears for files in your media library, because finding the size of anything else would mean a request to another server every time the page loads.

Explain an empty search

empty-search-message

When somebody presses Search without typing anything, this keeps them on the page and says so beside the field, instead of loading a results page that cannot explain itself. Focus moves back to the search box so the next keystroke lands where it should.

What it might disturb. Changes what your search form does: an empty search no longer submits. Only WordPress's own search form is affected, and with JavaScript off the form behaves exactly as it does now.

Show where the keyboard focus is

focus-outline

Draws a clear outline around whatever has keyboard focus. Many themes switch the browser's own outline off for the sake of appearance; without it, anybody navigating by keyboard cannot tell where they are on the page. This appears for keyboard use only, so mouse clicks look exactly as they do now.

What it might disturb. This one is deliberately forceful, because its whole job is to overrule a theme that switched the outline off. If your theme already has a focus style you like, leave this off — two indicators at once is worse than either.

Declare the page language

html-lang-dir

Makes sure the page says which language it is written in, and which direction it reads. A screen reader picks its pronunciation from this; without it, an English page can be read aloud with the phonetics of whatever language the listener's computer is set to.

What it might disturb. Only works if your theme calls language_attributes() in its html tag, which is what WordPress themes are supposed to do. If the attribute is still missing after switching this on, the theme has hard-coded its html tag and the fix has to be made there — the finding will tell you so.

Name fields that only have placeholder text

label-form-fields

Where a form field has placeholder text but no label, this makes the placeholder the field's name for assistive technology as well. Nothing changes on screen. It never invents a name out of a field's internal id — a field with no placeholder is left alone and keeps its finding, because a plausible label is worse than a missing one.

What it might disturb. Only fields that already have placeholder text are covered, so this closes some findings and deliberately leaves the rest. A placeholder acting as a label is itself a compromise; a real, visible label is better. Runs in the browser, so it does nothing with JavaScript off.

link-underline

Underlines links that sit inside paragraphs and lists. If colour is the only thing marking a link, readers who cannot distinguish that colour cannot see it is a link at all. Navigation, buttons and menus are left alone, because those are recognisable from where they sit rather than from how they look.

What it might disturb. This changes how your pages look, which none of the other fixes really do. It targets links inside paragraphs, list items and table cells; a theme that builds body text out of something else will not be covered, and a design that wraps whole cards in a link inside a paragraph may pick up a line you did not want.

Say when a link opens a new tab

new-window-warning

Adds "(opens in a new tab)" to links in your content that open one, announced to screen readers but not shown on screen. A new tab removes the back button, and without warning the reader has no way to tell that is what happened.

What it might disturb. Covers links inside post and page content. Links your theme prints — in menus, headers, footers or widgets — are not reached by this, because changing those would mean rewriting the whole page rather than the part you wrote.

Give every page a title

page-title

Asks WordPress to write the page title your theme never asked for. The title names the page in browser tabs, bookmarks, search results and the window list a screen reader reads out — a site where every page is called the same thing cannot be navigated by any of them. WordPress composes the text itself; nothing is written into your content.

What it might disturb. Takes effect the next time a page loads: theme support is declared long before a settings request arrives, so it cannot change the request that switched it on. A theme that already declares support needs nothing from this.

skip-link

Puts a "Skip to content" link at the very start of every page, visible only while it has keyboard focus, and places the target it jumps to at the start of your content. Without one, reaching the article past a large menu can take dozens of key presses on every page.

What it might disturb. Needs your theme to call wp_body_open(), which themes have done since WordPress 5.2; a much older theme may not, and then nothing is printed. The link lands at the start of your post content rather than at your theme's own main element, so on a page built entirely out of widgets it may skip less than you expect. If your theme already has a skip link, you will now have two.

Put the tab order back in reading order

strip-positive-tabindex

Finds elements given a tabindex above zero and sets it to zero, so tabbing follows the order things appear on the page. A positive tabindex pulls an element ahead of everything else, which makes the first Tab press jump somewhere unexpected.

What it might disturb. Runs in the browser after the page loads, so it cannot help a reader with JavaScript off, and it is a repair rather than a substitute for correcting the markup. If something on your site deliberately relies on a custom tab order, this will undo it.

Remove tooltips that repeat the link text

strip-redundant-title

Removes a title attribute from a link or button when it says exactly what the visible text already says. Two identical names mean some screen readers announce it twice and others drop the visible text; the tooltip itself is invisible on touch and unreachable by keyboard.

What it might disturb. Only exact duplicates are removed, and never from an iframe or an abbreviation, where the title is the element's real name. Runs in the browser, so it does nothing with JavaScript off.

Let people zoom on a phone

viewport-scalable

Removes the part of your theme's viewport tag that blocks pinch-zoom, or that caps it below twice the normal size. Readers with low vision rely on zooming to read at all, and this takes it away on exactly the devices where it matters most.

What it might disturb. The correction is made in the browser once the page has loaded, so a reader may briefly get the theme's original setting. This is a repair, not a substitute for correcting the viewport tag in your theme — and with JavaScript off it does nothing at all.

Turning them on

Settings lists all fourteen with their switches. From the command line:

wp wsak fixes                  # list them with their current state
wp wsak fixes skip-link --on
wp wsak fixes link-underline --off

Controlling them in code

wsak_site_fixes filters the set of fixes the plugin knows about. wsak_enabled_site_fixes filters which are active, which is the one to use if you want a fix forced on or off regardless of the setting:

add_filter( 'wsak_enabled_site_fixes', function ( array $enabled ): array {
    // Always on, whatever the settings screen says.
    $enabled[] = 'skip-link';

    return array_unique( $enabled );
} );

Two fixes have their own filters for finer control: wsak_skip_link_applies decides whether the skip link is printed on a given request, and wsak_may_upload_pdf decides whether a particular upload is allowed.

Last updated . Something here wrong or missing? Tell us and we will fix it.