=== SentryPrime Accessibility Fixes ===
Contributors: sentryprime
Tags: accessibility, wcag, a11y, sentryprime, remediation
Requires at least: 6.9
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.0.44
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Stores accessibility fixes per page and applies them on the front end. A connector for SentryPrime.

== Description ==

**SentryPrime Accessibility Fixes** is the WordPress connector for [SentryPrime](https://sentryprime.com/). It receives remediation instructions, stores them in a per-page FixStore, and delivers fixes on the front end using output buffering (with durable updates for media, document language, titles, and supported page builders).

Applying fixes, rolling them back, and showing fixes already stored on the site work for every site. This plugin does not check a plan or a license key.

This plugin is not a scanner. Scanning and new fix instructions come from SentryPrime. When a site has no active SentryPrime plan, SentryPrime does not run scans and does not send new fixes. Fixes already stored in WordPress stay available.

This plugin provides:

* REST endpoints under `ada-scanner/v1` (the paths existing SentryPrime sites already call) and `sentryprime-accessibility-fixes/v1`
* Bearer API keys for authenticated calls
* Admin tools: API settings, and request logs that stay off until an administrator turns them on

**Important:** Do not run this plugin alongside the previous SentryPrime scanner plugin. Deactivate that plugin first.

= External services =

This plugin does not phone home. [SentryPrime](https://sentryprime.com/) is a separate service that calls this site.

* **Service:** SentryPrime (`https://sentryprime.com/`, API traffic to this site under `/wp-json/ada-scanner/v1/` and `/wp-json/sentryprime-accessibility-fixes/v1/`).
* **What it is used for:** SentryPrime scans the connected site and sends fix instructions. This plugin stores those instructions and renders them. It does not perform the scan.
* **Data sent to this site by SentryPrime:** page URLs and fix payloads, authenticated with a bearer API key an administrator creates in wp-admin.
* **Data this plugin sends back:** REST responses for those requests (success or failure, stored fix summaries, and the site URL). No license key is collected or sent.
* **When there is no active plan:** SentryPrime does not run scans and does not send new fixes. This plugin still applies, rolls back, and shows fixes that are already stored.
* **Legal:** [Terms of use](https://sentryprime.com/terms/) and [Privacy policy](https://sentryprime.com/privacy-policy-2/).

= Privacy =

* **Stored locally:** API keys, fix data in post meta, and request audit summaries only after an administrator turns logging on.
* **Sent by this plugin to SentryPrime:** nothing on a schedule. Replies to SentryPrime's own REST calls include the result of that call.
* **Log files:** off by default. When an administrator enables logging, daily files are written under the uploads directory `sentryprime-accessibility-fixes` (denied from the web; readable in wp-admin).

= Requirements =

* An API key created under **SentryPrime → API Settings** so SentryPrime can authenticate to your site.
* A SentryPrime account with an active plan is what runs scans and sends new fixes. It is not required for this plugin to show fixes already stored on the site.

== Installation ==

1. Upload the plugin folder to `/wp-content/plugins/` or install from the WordPress Plugins screen.
2. Deactivate the previous SentryPrime scanner plugin if it is active.
3. Activate **SentryPrime Accessibility Fixes**.
4. Go to **SentryPrime → API Settings** and generate an API key for SentryPrime.
5. In SentryPrime, connect to this site with the REST base URL and API key (`/wp-json/ada-scanner/v1/...`).

== Frequently Asked Questions ==

= Does this plugin scan my site for accessibility issues? =

No. Scanning runs in SentryPrime. This plugin stores the fixes SentryPrime sends and shows them on the front end.

= Does a missing plan turn off fixes on the site? =

No. This plugin does not lock apply, rollback, or front-end delivery. SentryPrime is what stops scans and new fixes when there is no active plan.

= Where are logs stored? =

Logging is off until you enable it under **SentryPrime → Request Logs**. Enabled logs are written in the uploads directory, not in the plugin folder.

== Changelog ==

= 1.0.44 =
* Runtime CSS is registered only with wp_enqueue_style() and wp_add_inline_style(). No hand-built style tags.

= 1.0.43 =
* Front-end delivery uses the WordPress template enhancement buffer. Requires WordPress 6.9.
* Stored runtime CSS is sanitized before it is printed.

= 1.0.42 =
* Removed license checks. Apply, rollback, and front-end delivery work on every site. Plan limits stay on the SentryPrime service.
* Renamed to SentryPrime Accessibility Fixes.
* Runtime CSS is printed with wp_add_inline_style().
* Logging is off by default and, when enabled, is stored under uploads.
* Removed the bundled test-fixture pages.

= 1.0.41 =
* Directory review: distinctive plugin name, no license lock on built-in fix delivery, runtime CSS enqueued with WordPress, logs stored under uploads.
* Existing API keys, FixStore data, and the `ada-scanner/v1` REST paths keep working.

= 1.0.40 =
* WordPress.org packaging: full GPL license text, readme, uninstall cleanup, and deploy excludes.
* Text domain loading for translations.
* Admin UX: no inline JavaScript; REST/CORS input sanitization.

= 1.0.0 =
* Initial release: FixStore, runtime HTML renderer, REST parity with the legacy scanner namespace, admin settings and logs.

== Upgrade Notice ==

= 1.0.44 =
Runtime CSS uses WordPress enqueue APIs only.

= 1.0.43 =
Requires WordPress 6.9. Front-end fixes are applied through WordPress's template buffer, and stored CSS is sanitized.

= 1.0.42 =
License checks are gone. Fixes already stored on the site keep applying. SentryPrime REST paths are unchanged.
