=== AccessMate – AI Accessibility Scanner & Widget ===
Contributors: awsmin
Tags: accessibility, wcag, screen reader, ada, aria
Requires at least: 5.8
Tested up to: 6.9
Stable tag: 1.0.0
Requires PHP: 7.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

AI-powered WCAG 2.1 AA accessibility scanner with auto-fix suggestions and a visitor-facing accessibility toolbar. Free — bring your own AI key.

== Description ==

**AccessMate** scans your WordPress site for WCAG 2.1 AA accessibility issues, scores each page, and provides guided fixes — all from your WordPress dashboard.

**Zero running cost for you.** AccessMate is 100% free. AI features (code fixes, plain-English explanations) use your own API key from Anthropic, OpenAI, Google Gemini, or a local Ollama instance. Your key is stored encrypted in your database and never proxied through our servers.

= ♿ Core features =

✔  **Accessibility scanner** — checks 12 WCAG 2.1 AA rules on every page of your site
✔  **Score & grade** — A–F accessibility score with POUR (Perceivable, Operable, Understandable, Robust) breakdown
✔  **Issue detail panel** — shows the offending HTML, WCAG criterion, and affected element count
✔  **Issues by page** — stacked bar chart showing critical/warning/notice counts per page
✔  **Visitor accessibility toolbar** — minimal floating widget with 10 user-controlled accessibility features
✔  **AI auto-fix** *(requires API key)* — generates corrected HTML for fixable issues
✔  **AI explanations** *(requires API key)* — plain-English summaries for non-technical site owners

= 12 WCAG rules checked =

1. Images missing alt text (WCAG 1.1.1)
2. Colour contrast heuristic (WCAG 1.4.3)
3. Data tables missing headers (WCAG 1.3.1)
4. Missing landmark elements (WCAG 1.3.6)
5. Interactive elements not keyboard accessible (WCAG 2.1.1)
6. CSS animations without reduced-motion guard (WCAG 2.3.3)
7. Links with non-descriptive text (WCAG 2.4.4)
8. Skipped or empty heading levels (WCAG 2.4.6)
9. Focus indicator removed via CSS (WCAG 2.4.7)
10. HTML lang attribute missing (WCAG 3.1.1)
11. Form inputs missing label association (WCAG 4.1.2)
12. Invalid ARIA role attributes (WCAG 4.1.2)

= Visitor accessibility widget features =

✔ Font size 
✔ High contrast 
✔ Dyslexia font 
✔ Grayscale 
✔ Reading guide 
✔ Pause animations 
✔ Line height 
✔ Large cursor 
✔ Highlight links 
✔ Screen mask

= AI providers supported =

* **Anthropic Claude** (claude-haiku-4-5, claude-sonnet-4)
* **OpenAI** (gpt-4o-mini, gpt-4o)
* **Google Gemini** (gemini-1.5-flash, gemini-1.5-pro)
* **Ollama** (local, no key needed — llama3.2, mistral, phi3)

= Privacy =

AccessMate makes no external requests unless you configure an AI provider and trigger an AI action. When an AI action is triggered, your WordPress server makes a direct request to your chosen provider using your key. No data passes through AccessMate servers. The API key is encrypted at rest using AES-256-CBC with your WordPress auth salt.

== Installation ==

1. Upload the `accessmate` folder to `/wp-content/plugins/`
2. Activate the plugin through the **Plugins** menu in WordPress
3. Navigate to **AccessMate** in your admin menu
4. Click **Scan for issues** to perform your first accessibility check
5. *(Optional)* Go to **Settings** to add an AI provider key for AI-powered features

== Frequently Asked Questions ==

= Is AccessMate free? =

Yes, completely free. There are no premium tiers, subscriptions, or hidden costs. AI features use your own API key billed directly by the AI provider.

= Does AccessMate guarantee WCAG compliance? =

No. Automated scanning identifies a significant subset of WCAG 2.1 AA issues but cannot replace manual testing with real assistive technologies. The plugin's report includes a disclaimer to that effect.

= Is the AI API key stored securely? =

Your key is encrypted with AES-256-CBC using your WordPress authentication salt before being stored in `wp_options`. The raw key is never returned in any API response — only a boolean `ai_key_set` flag.

= Which pages does AccessMate scan? =

The scanner can scan any publicly accessible URL on your site. Run a scan from the Dashboard (defaults to your homepage) or pass a specific URL via the REST API (`POST /wp-json/accessmate/v1/scan` with a `url` body parameter).

= Does the toolbar affect my site's performance? =

The widget bundle is under 10KB (3.7KB gzipped) and loads with the `defer` attribute. It uses Shadow DOM so its styles cannot affect your existing CSS.

= Will AccessMate conflict with Elementor or WooCommerce? =

AccessMate only adds hooks for the REST API, WP-Cron, and `wp_footer`. It does not modify the frontend DOM except via the opt-in accessibility toolbar.

== Screenshots ==

1. Dashboard — accessibility score ring, POUR breakdown, and Issues by Page chart
2. Pages & Posts — per-page scanner with progress and per-URL results
3. Issue detail panel — offending code, WCAG reference, and AI fix button
4. Settings — AI provider selector, encrypted key input, and connection test
5. Widget configurator — live preview with colour and position controls

== Third Party Libraries ==

* [axe-core](https://github.com/dequelabs/axe-core) by Deque Systems — Mozilla Public License 2.0 (MPL-2.0)
* [OpenDyslexic font via Fontsource](https://fontsource.org/fonts/opendyslexic) — Bitstream Vera Fonts License — loaded on demand from jsDelivr CDN only when the dyslexia font feature is enabled by the visitor

== External Services ==

This plugin can connect to the following external services. No external requests are made unless you explicitly configure and trigger the relevant feature.

= AI providers (optional) =

When you add an API key and click an AI action (auto-fix suggestion, alt-text generation, or accessibility report summary), your WordPress server sends a direct HTTPS request to your chosen AI provider. The request contains the page HTML snippet and accessibility issue context being analysed. No data passes through AccessMate servers. These requests are only sent when you have entered an API key in Settings and manually trigger an AI action.

**Anthropic** — `https://api.anthropic.com/`
Used for: AI fix suggestions, alt-text generation, accessibility report summaries.
Data sent: page HTML snippet, accessibility issue context, and your Anthropic API key (in the request header).
[Terms of Service](https://www.anthropic.com/legal/consumer-terms) | [Privacy Policy](https://www.anthropic.com/legal/privacy)

**OpenAI** — `https://api.openai.com/`
Used for: AI fix suggestions, alt-text generation, accessibility report summaries.
Data sent: page HTML snippet, accessibility issue context, and your OpenAI API key (in the request header).
[Terms of Service](https://openai.com/policies/terms-of-use) | [Privacy Policy](https://openai.com/policies/privacy-policy)

**Google Gemini** — `https://generativelanguage.googleapis.com/`
Used for: AI fix suggestions, alt-text generation, accessibility report summaries.
Data sent: page HTML snippet, accessibility issue context, and your Gemini API key (as a URL parameter).
[Terms of Service](https://ai.google.dev/gemini-api/terms) | [Privacy Policy](https://policies.google.com/privacy)

**Ollama** — `http://localhost:11434/` (local only)
Ollama runs entirely on the user's own machine or local network. No data is sent to any external server.

= jsDelivr CDN (visitor-facing, on demand) =

When a site visitor enables the **Dyslexia Font** feature in the accessibility toolbar, their browser loads the OpenDyslexic font stylesheet from jsDelivr. This is a standard browser-initiated HTTP request that includes the visitor's IP address and User-Agent string. The font is cached locally after the first load; no further requests are made on subsequent pages. This request is triggered only by the visitor explicitly toggling the dyslexia font feature — it is never loaded automatically.

**jsDelivr** — `https://cdn.jsdelivr.net/`
[Privacy Policy](https://www.jsdelivr.com/privacy-policy-jsdelivr-net)

== Upgrade Notice ==

= 1.0.0 =
Initial release. No upgrade steps required.

== Changelog ==

= 1.0.0 =
* Initial release
* 12-rule WCAG 2.1 AA scanner with per-page scoring
* React admin dashboard with POUR breakdown and Issues by Page chart
* Per-page scanner with per-URL results and slide-in issue panel
* Per-page issue view with Details panel and AI fix button
* AI provider integration (Anthropic, OpenAI, Gemini, Ollama) — bring your own key
* Visitor accessibility toolbar with 10 features (Shadow DOM, localStorage)
* WP-Cron scheduled scans (daily, weekly, monthly)
* Widget configurator with colour, position, and feature toggles
* Full i18n support — all user-facing strings are translatable
