=== Vouchlog – Accessibility Logbook, Scanner & Color Contrast Checker ===
Contributors: lalokupfer
Tags: accessibility checker, accessibility statement, accessibility toolbar, color contrast, ada
Requires at least: 6.9
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Keep a dated, tamper-evident accessibility record: WCAG 2.2 scans at desktop and phone width, a color contrast checker, safe fixes and a report.

== Description ==

**Vouchlog keeps the record.** Every scan, every fix you switch on or off, and every manual test you note is written to a dated, tamper-evident evidence log. When a customer, an auditor or somebody's lawyer asks what you have done about accessibility, you print the report — with dates — instead of starting from nothing.

It is a website accessibility checker, a color contrast checker, a set of safe fixes, and an accessibility statement generator, built around that log.

= How this is different =

* **Evidence, not promises.** Each log entry stores the SHA-256 hash of the entry before it. The Evidence screen re-checks the whole chain every time you open it and names the first entry that no longer matches, so an edit after the fact shows up. Download the log to keep a copy outside the site.
* **The report and the statement come from real data.** The dated evidence report and the accessibility statement are generated from your actual scans and fixes, not from a form you fill in by hand.
* **It checks the page your visitors get.** The WCAG 2.2 scanner opens each page in your own browser — theme, header, footer, widgets and all — at desktop width AND at phone width, so it finds phone-only problems: pages that scroll sideways, tap targets under 24 × 24 pixels, pinch zoom switched off.
* **Fixes change the HTML, not an overlay.** The safe fixes change the HTML and CSS your server sends (the markup through WordPress core's own HTML tag processor), so screen readers get them with JavaScript turned off. Every fix is off until you turn it on, and every switch is logged.
* **Nothing leaves your site.** No account, no API key, no external service.

= The WCAG 2.2 accessibility scanner =

Click "Scan my site now" and it checks your home page and your newest pages and posts (you choose how many), plus any addresses you add. For every problem it shows the WCAG success criterion, the exact element (a CSS selector and the HTML), and how to fix it. Checks include:

* images with no alt text (1.1.1) — an alt text checker for the pages visitors actually see
* links and buttons with no text a screen reader can announce (2.4.4, 4.1.2)
* form fields with no label (1.3.1)
* color contrast of the text on each page, with the nearest color that passes (1.4.3)
* pinch zoom disabled on phones (1.4.4)
* pages that scroll sideways at phone width (1.4.10)
* tap targets smaller than 24 × 24 pixels (2.5.8, new in WCAG 2.2)
* missing page language, missing page title, no way to skip to the content, positive tabindex, untitled iframes, keyboard-reachable content hidden from screen readers, empty headings, moving text, and videos that may need captions

Issues are tracked over time: when a later scan no longer finds one, it is marked resolved with the date.

= Color contrast checker =

A contrast checker for any two colors: the ratio, pass or fail for WCAG AA and AAA at normal and large text sizes and for icons, and the nearest text color that passes — one click to use it. The scan also lists every low-contrast text it found on your pages, with its real colors, its ratio and a suggested color.

= Safe fixes you switch on one by one =

* let visitors pinch-zoom on phones
* declare the page language
* add a "Skip to content" link (only where the theme has none)
* always show keyboard focus
* announce links that open a new tab
* restore the natural keyboard order
* fill missing alt text from the alt text already saved in the media library — never invented
* give placeholder-only form fields an accessible name
* respect the visitor's "reduce motion" setting
* underline links inside text

= Dated evidence report and accessibility statement =

The report shows what was tested and when, open issues by WCAG criterion, what was fixed and when, your manual test notes, and the verification of the log with its current hash. Print it, or save it as a PDF, from a laptop or a phone.

The accessibility statement page is created as a draft for you to review and publish. It lists known problems in plain language, what you have done, how the site was checked and how to report a problem — and it updates itself after each scan. It never claims full conformance, because automated checks cannot establish that.

= Visitor accessibility toolbar =

A small button lets each visitor choose larger text, high contrast, underlined links, readable text spacing, paused animations, a keyboard focus highlight and a reading guide. Choices are kept in that visitor's own browser; no cookies are set. Link to `#a11y-preferences` from any menu to open it. The toolbar changes how the site looks for one visitor; it does not make a site accessible on its own, and it says so.

= Privacy =

This plugin does not connect to any external service. It makes no outbound requests of any kind — no telemetry, no analytics, no fonts or scripts from a CDN. It stores no IP addresses and no visitor data.

== Installation ==

1. Install and activate the plugin.
2. Go to **Accessibility → Scan** and click **Scan my site now**.
3. Open each issue to see the element and how to fix it. Switch on the safe fixes you want under **Fixes**, then scan again.
4. Under **Settings**, add your contact details and create the statement page.
5. Under **Evidence**, add notes about manual tests, and open the dated report whenever you need it.

== Frequently Asked Questions ==

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

No plugin can do that, and you should be wary of any that says it does. Automated checks find only part of the barriers people meet (commonly quoted at 30–40%). This plugin finds what can be found automatically, fixes a set of problems safely, and keeps a dated record of the testing and remediation you do — which is what you need to show your work. Manual testing and user feedback cover the rest.

= Is this an ADA compliance checker? =

It is a WCAG 2.2 checker. WCAG 2.1 AA is the standard US courts, settlements and the ADA Title II rule refer to, and WCAG 2.2 includes it, so the scan checks the automatable parts of what an ADA review looks at. It cannot certify anything, and the report says so.

= Is Vouchlog affiliated with the W3C? =

No. WCAG (the Web Content Accessibility Guidelines) is a standard published by the W3C. Vouchlog is an independent plugin that checks pages against that standard; it is not affiliated with or endorsed by the W3C.

= How is this different from an accessibility overlay? =

Overlays run JavaScript over the page and are widely criticised for it. The fixes here change the HTML your server sends, are each off until you enable them, and are logged. The visitor toolbar only offers personal display preferences and is labelled as such.

= What does the evidence log actually prove? =

That an entry has not been changed since it was written: each entry's hash covers the entry before it, so an edit breaks the chain from that point. Someone with direct database access could rebuild the whole chain; keeping a downloaded copy or a printed report outside the site is what makes that detectable too.

= Does it check color contrast? =

Yes. The contrast checker tests any two colors, and the scanner measures the contrast of the visible text on each page against its real background, reports the ratio, and suggests the nearest color that passes. Text over a background image or gradient, or text that is partly transparent, is skipped rather than guessed — check those by eye with the contrast checker.

= Does it find missing alt text? =

Yes. Images with no alt attribute are reported with the page and the element. The "media library alt text" fix fills in alt text you already saved in the media library; it never invents alt text.

= Why scan at phone width? =

Some failures only happen on phones: pages that scroll sideways (1.4.10 Reflow), tap targets that are too small (2.5.8 Target Size) and pinch zoom switched off (1.4.4). Each page is checked at 1280 px and at 360 px (the phone width can be switched off in Settings).

= Does the scan slow down my site? =

No. The scan runs in your own browser while you watch; your visitors are not affected. With fixes switched on, the page is processed once as it is sent, using WordPress core's HTML processor.

= Does it work with page caching? =

Yes. The fixes are part of the HTML, so a page cache stores the fixed page. Clear the cache after switching fixes on or off. Scans are run while you are logged in, which most caches skip.

= A page could not be scanned. Why? =

The scan opens each page in a frame on your own site. If the page sends `X-Frame-Options: DENY` (some security plugins do) or redirects to another domain, it cannot be read, and the scan says so for that page and carries on.

= What about the European Accessibility Act? =

The EU rules expect an accessibility statement with a way for people to report problems. The statement page this plugin creates includes your contact details, the known issues and the date of the last review.

= Does it send my data anywhere? =

No. There is no external service, account or API key. Scans run in your browser and results are stored in your site's database.

= What happens when I delete the plugin? =

Deleting it removes its database tables and its settings, including the evidence log — download the log first if you want to keep it. Deactivating keeps everything. The statement page, if you created one, stays, because it is your content.

== Changelog ==

= 1.0.0 =
* First release: WCAG 2.2 scanner at desktop and phone width, color contrast checker with suggested colors, safe fixes, tamper-evident evidence log with JSON download, dated evidence report, accessibility statement page, visitor accessibility toolbar.

== Upgrade Notice ==

= 1.0.0 =
First release.
