=== Fixlight – Accessibility Checker & Fixer ===
Contributors: fixlight
Tags: accessibility, alt text, wcag, screen reader, a11y
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 0.1.7
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Accessibility fixes, not an accessibility widget. Finds problems on your site and fixes the safe ones in your own HTML.

== Description ==

Fixlight checks your pages for common accessibility problems, fixes the ones that can be fixed safely, and tells you in plain language what still needs a person.

**It is not an overlay.** Fixlight adds no toolbar, no widget and no script for your visitors. The fixes are made in the HTML your site sends, so they work for screen readers, keyboards and search engines, and they keep working if JavaScript is off.

**No account, no limits.** Everything in this plugin works without signing up for anything. There are no page limits, no visit caps and no trial period.

= What it fixes automatically =

Each fix can be turned off on its own, and turning one off undoes it immediately. Your posts and theme files are never edited.

* Page language, when the theme does not set one
* Empty or missing page titles
* A "Skip to content" link for keyboard users (only when the theme has none)
* Names for menus, sidebars and search forms that screen readers cannot tell apart (only when a page has two or more of one kind)
* The header, main content and footer marked as page regions, when the theme leaves them out (and a second header or footer, or one inside another, no longer counted twice)
* Lists that screen readers would announce wrong, such as list items outside a list or a list wrapped in another list
* Hidden labels that leave out a link's or button's visible text, references to parts of the page that do not exist, and unnamed icons inside links and buttons that already have a name
* Labels placed where screen readers may skip them, kept by moving them or giving them a role; unnamed background pictures named from the media library or marked as decoration
* A clearly visible keyboard focus outline
* Alt text on images in posts, copied from the media library
* Tracking pixels, spacers and alt text that only repeats the link it sits in (an author photo next to the name) marked as decorative
* Titles for embedded videos, maps and other iframes
* Labels for form fields that only have placeholder text, and names for dropdowns that have none
* Labels for icon-only links and buttons (social icons, search, menu, cart), and the page's title for empty links to your own pages, such as a post's picture; menu arrows and other icons made into buttons are named too
* Headings that read in order: an empty heading is no longer announced, a page with no main heading gets its title heading as the main one, and a heading that skips a level is announced at the next one (nothing changes on screen)
* "Read more" links that say which post they lead to
* Positive tabindex values that scramble the keyboard order
* Warnings for links that open a new tab or a PDF
* Zoom blocked on phones
* Play/pause controls on video and audio that start on their own
* Captions: a captions file (.vtt) you upload next to a video is added to it, so visitors can turn captions on
* Animations stopped for visitors who ask their device to reduce motion
* Optional: Contrast colours. Text that is too faint against its background is made a little darker or lighter, the nearest shade of the same colour that passes, using the colours the browser check finds. You see every change before you turn it on, and you can keep any colour as it is.
* Optional: bigger tap areas, so controls smaller than 24 by 24 pixels (category badges, slider dots, small icon buttons) get at least that size
* Optional: underlined links in text, for people who cannot tell colours apart
* Theme and plugin fixes for Divi (4 and 5), Extra, Bloom and Monarch: their mobile menus, search icons, toggles and close buttons work with the keyboard, submenus open on keyboard focus, and their icon links and share buttons get names

= What it checks =

* **Key pages, in your browser:** your home page and recently changed pages are tested with axe-core, the open-source engine behind most accessibility testing tools. This includes colour contrast.
* **The whole site, on your server:** every published page is checked once a week, a few at a time, and each page is re-checked after you update it.

You see a score with and without Fixlight, how many problems were fixed, and a list of what is left, most important first. Every item explains why it matters and how to fix it.

= Image alt text =

The Images screen lists every image in your media library that has no alt text. Describe each one, or mark it decorative. The alt text is saved in WordPress itself, so it stays if you ever remove Fixlight.

Optional AI suggestions write a first draft for you to check: 50 free images per site per month through Fixlight's service, or unlimited with the AI you connected to WordPress (Settings → Connectors, WordPress 7 and later).

= Accessibility statement and barrier reports =

Under **Fixlight → Statement**, fill in a few details and publish an accessibility statement page with one click. It says what your site aims for, what Fixlight does and how to reach you, and it never claims that the site is compliant. The page includes a short form where visitors can tell you about a barrier (you can also place it anywhere with the `[fixlight_report_form]` shortcode). Reports are saved in your site's own database and emailed to the contact address you set (at most 10 emails an hour; every report is still listed), and you see them under **Fixlight → Reports**. The form has no CAPTCHA, because a CAPTCHA is a barrier itself. It never stores visitors' IP addresses; to limit repeated sending it keeps a one-way code made from the address for one hour. Reports stay until you delete them, and WordPress's Export and Erase Personal Data tools include them (matched by email address). Fixlight also adds suggested text to WordPress's privacy policy guide.

= For developers =

* `wp fixlight scan` checks every published page from the command line, and `wp fixlight status` shows the results.
* The statement is built by the `[fixlight_statement]` shortcode, and the `fixlight_statement_sections` filter can add sections to it (their HTML is filtered with wp_kses: post tags plus form fields).

= Honest about what it can do =

No plugin can make a website fully accessible on its own, and automated checks find only some of the barriers people meet. Fixlight fixes what can be fixed safely and shows you the rest. It does not claim that your site complies with any law or standard, and it is not legal advice. Test with a keyboard and a screen reader too.

== Installation ==

1. Install and activate Fixlight from the Plugins screen.
2. Go to **Fixlight → Overview** and click **Check key pages now**.
3. Review the list of what Fixlight fixed and what still needs you. Turn individual fixes on or off under **Fixlight → Fixes**.

== Screenshots ==

1. The Overview: a score with and without Fixlight, what Fixlight fixed, and what still needs you.
2. Every issue explains why it matters, how to fix it, and where it happens.
3. Each fix has its own switch. Turning one off undoes it immediately.
4. AI suggestions for alt text across the media library. You check each one before saving.
5. Optional AI: Fixlight's free service or the AI connected to WordPress.

== Frequently Asked Questions ==

= Will this make my site ADA or WCAG compliant? =

No plugin can promise that. Fixlight fixes common problems in your HTML and helps you find the rest, but accessibility also depends on your content, your design and how people actually use the site. Fixlight never claims compliance.

= Does it slow my site down? =

The fixes run while WordPress sends a page and take about 2 milliseconds on a typical page. Visitors download no extra scripts. If you use a page cache, the fixed page is what gets cached.

= Does it work with my theme and page builder? =

Fixlight works with the HTML your site produces, so it works with block themes, classic themes, Elementor, Divi, WooCommerce and most other plugins. It never changes pages while you are editing them in a page builder, including the Divi Builder.

For Divi 4 and 5, Extra, Bloom and Monarch it also has fixes made for their markup (they run only when that theme or plugin is active, and you can turn them off under Fixlight → Fixes). Some of their problems need the theme's own code to change, such as sliders built by JavaScript; Fixlight lists those for you instead. Text with too little contrast can be fixed with the optional Contrast colours switch.

= Does it send my data anywhere? =

Not unless you turn on AI alt text or anonymous statistics. Checks and fixes run in your browser and on your own server. If you turn on AI alt text, the images you ask about are sent to the service you choose; if you turn on anonymous statistics, counts of what Fixlight found and fixed are sent once a week. See "External services" below. Barrier reports from your statement page stay in your own database and are emailed from your own site.

= How does AI alt text work? =

On the Images screen, click Suggest (or suggest for a whole page of images). The AI writes a short description in your site's language, and you check it before saving. Choose Fixlight's free service (50 images per site per month, no account) or the AI you connected to WordPress (Settings → Connectors, WordPress 7 and later, unlimited and billed by your provider to you). AI is optional: you can always write alt text yourself, and nothing else in Fixlight depends on it.

= What happens if I deactivate it? =

The fixes stop at once, and your site goes back to exactly how it was. Alt text you added through the Images screen stays, because it is stored in WordPress itself.

= Can I see my site without the fixes? =

Yes. While logged in as an administrator, use **Preview home page without fixes** on the Overview screen, or add `?fixlight_off=1` to any page address.

== External services ==

Fixlight works without any external service. The alt text services below are used only if you turn on AI alt text in Fixlight → Settings, and only when you click Suggest on the Images screen. Apart from that, the plugin contacts fixlight.fernwaylabs.com only to send anonymous statistics, and only if you turn them on.

= Fixlight alt text service (fixlight.fernwaylabs.com) =

Used when you choose "Fixlight free service" and tick the consent box. The first time, the plugin sends your site address and the plugin version to get a token for your site (and again only if that token stops working). Each time you ask for a suggestion it sends that one image (resized to at most 768 pixels) and its context: file name, image title, caption, the title of the page it is used on, your site name and your site language. The service passes the image to Google's Gemini API and returns the description. It never stores the image or the text. It stores your site address, a one-way hash of your site's token and monthly usage counts, and, to stop abuse, a daily count of requests per network using a salted one-way hash of the IP address that changes every day.

* Fixlight terms: https://fixlight.fernwaylabs.com/terms/
* Fixlight privacy: https://fixlight.fernwaylabs.com/privacy/
* Google Gemini API terms: https://ai.google.dev/gemini-api/terms
* Google privacy policy: https://policies.google.com/privacy

= Anonymous statistics (only if you turn them on) =

Off unless you turn it on in Fixlight → Settings → Anonymous statistics; Fixlight never asks you to. While it is on, once a week the plugin sends to fixlight.fernwaylabs.com: how many problems of each kind it found and fixed, which of its fixes are on, your theme's folder name, your page builder, whether WooCommerce is active, the Fixlight, WordPress and PHP versions, and a random id made when you turned sharing on (it is deleted when you turn it off, and the next week's numbers replace the last). It never sends your site's address, pages, content or anything about your visitors. We publish totals across at least five sites, never one site's numbers.

* Fixlight privacy: https://fixlight.fernwaylabs.com/privacy/

= Links to fixlight.fernwaylabs.com =

Two links point to fixlight.fernwaylabs.com/go/, which counts the visit and forwards it: the optional credit link on your statement page (off unless you turn it on; it forwards to Fixlight's free site check) and the link in the More help card that you can send to an agency (it forwards to Fixlight Pro). Nothing is sent unless someone clicks one. The count keeps only how many people came from each link per day; to count each person once, it uses a salted one-way hash of the IP address that changes every day and is deleted after two days.

* Fixlight privacy: https://fixlight.fernwaylabs.com/privacy/

= The AI connected to WordPress (WordPress 7.0 and later) =

Used when you choose "The AI connected to WordPress". The image and context above go from your server to whichever provider you connected under Settings → Connectors, under that provider's terms. Fixlight's server is not involved.

== Third-party code ==

Fixlight includes axe-core 4.14.0 by Deque Systems, licensed under the Mozilla Public License 2.0. The bundled file is the project's unmodified release build, assets/vendor/axe-core/axe.min.js; its source code is at https://github.com/dequelabs/axe-core/tree/v4.14.0 and its license is in assets/vendor/axe-core. It is used only on Fixlight's own check pages, never for visitors.

== Changelog ==

= 0.1.7 =
* Fixed: turning a fix off now also clears WP-Optimize's page cache, so visitors get the change on their next visit instead of a cached page for up to a day. Hummingbird's page cache is cleared too.
* Fixed: turning Fixlight back on clears your page cache, so pages cached while it was off get their fixes again right away.

= 0.1.6 =
* New: "Contrast colours" (off by default). Text that is too faint against its background is made a little darker or lighter: the nearest shade of the same colour that passes (4.5:1, or 3:1 for large text). The colours come from the browser check ("Check key pages"), each change applies only on the pages where the check saw it, and the Fixes screen lists every change, with a box to keep any colour, before you turn it on.
* New: "Bigger tap areas" (off by default). Controls smaller than 24 by 24 pixels that the browser check finds, such as category badges and slider dots, get at least that size.
* New: "Headings that read in order". An empty heading is no longer announced, a page with no main heading gets the heading that matches its title as the main one, and a heading that skips a level is announced at the next one. Nothing changes on screen.
* New: "Captions files for videos". A captions file (.vtt) with the same name as a video in the media library is added to the video.
* Improved: dropdowns with no label get a name; menu arrows and other icons made into buttons are named; labels put where screen readers may skip them are kept; unnamed background pictures get their media library text or are marked as decoration; a second page header or footer is no longer counted twice; alt text that only repeats its link is marked as decorative.
* The new fixes that change nothing on screen are on by default; each has its own switch on the Fixes screen.

= 0.1.5 =
* New: "Header, content and footer regions". When the theme does not mark its header, main content or footer as a page region, Fixlight marks the parts it uses for them, so screen reader users can jump straight to each.
* New: "Lists that read right". Lists that screen readers would announce wrong, such as list items outside a list or a list wrapped in another list, are repaired with roles. The markup is not moved.
* New: "Broken labels and references". Hidden labels that leave out a link's or button's visible text are removed (voice control users say what they see), and so are references to parts of the page that do not exist and the image role of unnamed icons inside links and buttons that already have a name.
* All three are on by default, change nothing on screen, and have their own switches on the Fixes screen.
* Improved: "Labels for icon links and buttons" now names an empty link to a page on your site, such as a post's picture, with that page's title (taken from another link to the same page, or from WordPress).
* Changed: the "Skip to content" link no longer marks a content area as the page's main region when that area also holds the site's header, footer or sidebar.

= 0.1.4 =
* New: "Names for menus and page regions". When a page has two or more menus, sidebars or search forms that screen readers cannot tell apart, Fixlight names each one: from a heading inside it, the menu's location or name in WordPress, its widget area, or where it sits (header, footer, sidebar). Nothing changes on screen. It is on by default and has its own switch on the Fixes screen.
* New: the checks now list "Page regions that cannot be told apart".

= 0.1.3 =
* Changed: the plugin's name in the plugin directory is now "Fixlight – Accessibility Checker & Fixer". Nothing else about the plugin changes.
* Changed: when you publish the statement page, Fixlight offers the optional "Accessibility fixes by Fixlight" link with a checkbox, unticked. It stays off unless you tick it, and it is never shown on sites running Fixlight Pro. The link now leads to Fixlight's free site check.

= 0.1.2 =
* New: if your site also runs an accessibility widget Fixlight knows (accessiBe, UserWay, AudioEye or Elementor's Web Accessibility), the Overview says so and links to step-by-step switching guides. It can deactivate the widget's own plugin after you confirm; it never edits code pasted into your theme, and it doesn't cancel your subscription with the widget's maker. Also on the command line: wp fixlight overlays.
* New: optional anonymous statistics (Settings → Anonymous statistics). Off unless you turn it on, and Fixlight never asks you to. See External services.

= 0.1.1 =
* New: an optional "Accessibility fixes by Fixlight" link at the end of the statement page. It is off unless you turn it on (Statement → Credit).
* New: after Fixlight has fixed something and you have used it for a few days, its screens ask once whether you would write a review. You can put it off or turn it off for good.
* New: a link you can send to the agency that looks after your site, in the Overview's More help card.

= 0.1.0 =
* First release: page checks (in the browser and in the background), automatic fixes, fixes for Divi, Extra, Bloom and Monarch, the Images screen with optional AI alt text suggestions, the accessibility statement page with a barrier report form, the Reports screen (with privacy export and erase for visitor reports) and WP-CLI commands.
