=== Wally Monitor ===
Contributors: equallyze
Tags: accessibility, wcag, a11y, seo, audit
Requires at least: 5.0
Tested up to: 6.9
Requires PHP: 7.4
Stable tag: 1.5.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Complete accessibility auditing tool for WordPress. Scan your entire site for WCAG 2.2 compliance issues and improve SEO rankings.

== Description ==

**Wally Monitor** is a comprehensive accessibility auditing plugin that helps you identify and fix accessibility issues on your WordPress website. Built on top of axe-core (the industry-standard accessibility testing engine), it provides detailed reports and actionable insights to make your site accessible to everyone.

= 📚 Third-Party Libraries =

This plugin uses the following open-source libraries:

* **axe-core v4.11.1** - Accessibility testing engine by Deque Systems
  Source: https://github.com/dequelabs/axe-core
  License: MPL-2.0
  
* **Chart.js v4.5.1** - JavaScript charting library
  Source: https://github.com/chartjs/Chart.js
  License: MIT
  
* **FPDF 1.86** - PHP PDF generation library (modified with Wally_ prefix to avoid conflicts)
  Source: http://www.fpdf.org/
  License: Free for personal and commercial use

= 🎯 Key Features =

* **Automated Full Site Scanning** - Analyze all pages, posts, and custom post types in one click
* **208+ Accessibility Rules** - ~90 axe-core rules + 13 WordPress-specific + 48 NBR 17.225 + 57 IF-THEN exclusive checks
* **Real-time WCAG Score** - Track your accessibility score from 0-100
* **SEO Integration** - Shows accessibility impact directly in Yoast SEO and Rank Math meta boxes
* **Block-Specific Detection** - Identifies issues in WordPress Gutenberg blocks (images, buttons, headings, etc.)
* **Historical Tracking** - Monitor progress over time with interactive charts
* **Editor Integration** - Analyze content while editing posts and pages
* **Professional Reports** - Clean, visual dashboards with detailed violation breakdowns
* **WCAG Level Detection** - Categorizes issues by WCAG A, AA, AAA conformance levels

= 🔍 What Does It Check? =

**Images & Media**
* Missing alt attributes
* Empty alt text
* Gallery accessibility
* Video captions

**Forms**
* Missing labels
* Fieldset accessibility
* Form validation

**Structure & Semantics**
* Heading hierarchy
* Landmark regions
* Navigation structure
* HTML validity

**Color & Contrast**
* Color contrast ratios (WCAG AA/AAA)
* Text readability

**Interactive Elements**
* Button labels
* Link descriptions
* Keyboard navigation
* Focus indicators

**WordPress Specific**
* Cover block contrast
* Site logo alt text
* Search widget labels
* Embed titles
* Custom HTML warnings

= 🚀 Why Accessibility Matters =

* **Legal Compliance** - Meet ADA, Section 508, and WCAG 2.2 requirements
* **Better SEO** - Google prioritizes accessible websites in search rankings
* **Wider Audience** - Reach 15%+ of users with disabilities
* **Improved UX** - Accessible sites work better for everyone
* **Brand Reputation** - Show you care about all users

= 💼 Perfect For =

* Marketing agencies managing multiple client sites
* Web developers building accessible themes/plugins
* Content creators ensuring inclusive content
* E-commerce stores reaching wider audiences
* Government and educational institutions
* Anyone committed to web accessibility

= 🎨 Clean, Modern Interface =

* Large, professional logo display
* Color-coded severity indicators
* Interactive violation cards with Quick Fix suggestions
* Mobile-responsive design
* WordPress admin design standards

= 🔌 Integrations =

* **Yoast SEO** - Accessibility analysis in SEO meta box
* **Rank Math** - Integrated accessibility scores
* **Gutenberg** - Block-level issue detection
* **Classic Editor** - Full compatibility

= 📊 Technical Details =

* Built on axe-core 4.11.1 (Deque Systems)
* No external API calls - all processing happens locally
* No data collection or tracking
* Lightweight and optimized for performance
* Works with any WordPress theme

= 🌐 Supported Languages =

* English
* Portuguese (Brazil) - Interface em Português

== Installation ==

= Automatic Installation =

1. Log in to your WordPress admin panel
2. Navigate to Plugins → Add New
3. Search for "Wally Monitor"
4. Click "Install Now" and then "Activate"
5. Access Wally Monitor from the admin sidebar

= Manual Installation =

1. Download the plugin ZIP file
2. Log in to your WordPress admin panel
3. Navigate to Plugins → Add New → Upload Plugin
4. Choose the downloaded ZIP file and click "Install Now"
5. Activate the plugin
6. Access Wally Monitor from the admin sidebar

= First Steps =

1. Click on **Wally Monitor** in the WordPress admin menu
2. Click **"Analisar Site Completo Agora"** (Analyze Full Site Now)
3. Wait for the scan to complete (typically 1-3 seconds per page)
4. Review the detailed accessibility report
5. Check individual post/page scores in the editor meta box

== Frequently Asked Questions ==

= Is Wally Monitor free? =

Yes! Wally Monitor is completely free and open source under GPLv2 license.

= Does it work with Gutenberg blocks? =

Absolutely! Wally Monitor has special detection for WordPress Gutenberg blocks including images, buttons, galleries, headings, forms, and more.

= Is it compatible with page builders? =

Yes, it works with any page builder (Elementor, Divi, Beaver Builder, etc.) as it analyzes the rendered HTML output.

= Does it slow down my site? =

No. Wally Monitor only runs when you manually trigger an analysis in the admin area. It has zero impact on front-end performance.

= Can I analyze password-protected pages? =

Yes, as long as you're logged in as an administrator. The plugin analyzes pages from within WordPress.

= Does it send data to external servers? =

No. All analysis happens locally in your browser using axe-core. No data is sent to external services.

= How accurate is the WCAG score? =

The score is calculated using industry-standard axe-core engine combined with WordPress-specific checks. It provides a reliable indicator of accessibility health.

= Can I export reports? =

Currently, reports are stored in your WordPress database with historical tracking. PDF export feature is planned for future releases.

= Does it check for keyboard navigation? =

Yes, it detects many keyboard navigation issues including missing focus indicators, keyboard traps, and interactive element accessibility.

= Is it multilingual? =

The interface is available in English and Portuguese (Brazil). The accessibility rules follow international WCAG standards.

= Does it replace manual testing? =

While Wally Monitor automates ~30-40% of WCAG checks, manual testing by accessibility experts is still recommended for complete compliance.

== Screenshots ==

1. **Main Dashboard** - Full site analysis with 103+ accessibility rules
2. **Detailed Report** - Violation breakdown by severity and WCAG level
3. **Editor Meta Box** - Real-time accessibility analysis while editing
4. **Historical Tracking** - Monitor progress over time with charts
5. **SEO Integration** - Accessibility impact shown in Yoast SEO
6. **Block Detection** - WordPress-specific block issue identification

== Changelog ==

= 1.5.2 - 2026-03-15 =
* Fixed: Site scanner now neutralizes `<main>`, `<header>`, `<footer>` landmarks before analysis (same fix as editor v1.4.2), eliminating 3 false positives: `landmark-no-duplicate-main`, `landmark-no-duplicate-banner`, `landmark-no-duplicate-contentinfo`

= 1.5.1 - 2026-03-15 =
* Fixed: Custom rules now generate unique CSS selectors for each element (via `getUniqueSelector()`), preventing the deduplication logic from collapsing multiple distinct violations into one
* Fixed: `custom-navigation-structure` now correctly reports all `<nav>` elements without `aria-label` (was showing 1 instead of 3 on pages with multiple navs)
* Fixed: All 17 custom rules updated — any rule detecting multiple elements of the same type now counts each one individually

= 1.5.0 - 2026-03-15 =
* New: `custom-social-links-incomplete` rule — detects Social Links blocks with missing URLs (non-focusable) or missing aria-labels
* New: `custom-file-block-accessibility` rule — detects File/Download blocks with generic button text ("Download") lacking aria-label context
* New: `custom-details-generic-summary` rule — detects Details/Accordion blocks with generic summary text ("Details", empty)
* New: `custom-generic-landmark` rule — detects `<section>` and `<aside>` elements (including Group blocks) without aria-label
* Updated: Custom Rules engine now has 17 rules (was 13), covering all major Gutenberg core blocks

= 1.4.3 - 2026-03-15 =
* Improved: `custom-empty-button-link` rule now detects Gutenberg buttons (`<a class="wp-block-button__link">`) without `href` — even when they have visible text, the missing href makes them non-focusable and invisible to screen readers

= 1.4.2 - 2026-03-15 =
* Fixed: False positive `landmark-no-duplicate-main` in editor scan — the admin page already has its own `<main>`, so injecting the scanned page's `<main>` made axe-core report duplicates
* Fixed: Neutralize document-level landmarks (`<main>`, `<header>`, `<footer>`) in injected content by converting to `<div>` with `data-wally-original-tag` attribute

= 1.4.1 - 2026-03-15 =
* Fixed: jQuery `.html()` crash ("Invalid regular expression: missing /") when axe-core violation messages contain literal HTML tags like `<script>` or `<template>`
* Fixed: Replaced `$().html()` with native `innerHTML` to bypass jQuery buildFragment/appendChild pipeline
* Fixed: Added robust `escapeHtml` fallback and escaped `error.message` / `v.helpUrl` in violation cards
* Fixed: Same jQuery crash in site scanner report (`wally-ui.js`)

= 1.4.0 - 2026-03-14 =
* **Wave 5 — Polish**: Production-quality refactoring
* Extracted shared JS rule helpers into `wally-rule-helpers.js` module (eliminates 7× duplicated functions across NBR + IF-THEN)
* Replaced regex-based HTML parsing with DOMDocument in `class-wally-html-checker.php` (Cron, REST API, CLI)
* Fixed WCAG mapping: `custom-empty-button-link` now correctly tags `wcag412` alongside `wcag244`
* Removed dead 3,068-line monolith `wally-monitor-admin.js` (fully replaced by modular architecture in v1.1.0)
* **Wave 4 — UX**: Prioritized action plan, advanced filters (engine/sort/group-by), page grouping, forced-colors/high-contrast CSS
* Updated documentation: file structure, changelog sync, version references

= 1.3.0 - 2025-03-14 =
* New: Analysis Modes — WCAG 2.2 (axe-core only, default), NBR 17.225 (custom only)
* New: NBR ↔ WCAG cross-reference map with 50+ bidirectional mappings
* New: Mode selector UI on reports page with engine badges
* Updated: axe-core to v4.11.1 (oklch/oklab contrast fixes, Shadow DOM improvements)
* Refactored: Scanner and Editor now delegate to AnalysisModes module

= 1.2.0 - 2025-01-15 =
* New: 57 IF-THEN exclusive rules based on NBR 17.225 + WCAG 2.2
* New: 7 rule groups — ARIA & Roles, Forms, Tables, Links, Media, Structure, Dynamic Content
* New: QuickFix code suggestions for all 57 new rules
* New: 21 SEO-critical accessibility rules

= 1.1.0 - 2025-01-10 =
* New: WP-CLI headless scanner with 6 subcommands
* New: WP-Cron scheduled scans with email notifications
* New: REST API with 6 endpoints
* New: 48 NBR 17.225 rules (Brazilian accessibility standard)
* New: Dashboard gauge with animated SVG arc
* New: Quick Fix Engine with copy-to-clipboard code snippets
* New: Onboarding wizard for first-time users
* Refactored: PHP architecture from monolith to 5+ SRP classes
* Refactored: JavaScript from monolith to 12+ modular files

= 1.0.2 - 2026-01-05 =
* **Security Update** - CRITICAL
* Fixed data sanitization issues identified by WordPress.org review team
* Added comprehensive validation for JSON report data
* Implemented recursive sanitization for all user input
* Added proper escaping for dynamically displayed content
* Enhanced security with `wally_monitor_sanitize_report_data()` and `wally_monitor_validate_report_structure()` functions
* Added JavaScript `escapeHtml()` function for client-side output escaping
* Improved validation for score ranges and violation counts

= 1.0.1 - 2025-12-22 =
* Updated Chart.js to version 4.5.1
* Improved FPDF library conflict prevention with namespace isolation
* Enhanced class existence checks for FPDF

= 1.0.0 - 2025-11-23 =
* **Initial Release**
* Full site accessibility scanning
* 208+ accessibility rules (90 axe-core + 13 WordPress custom + 48 NBR 17.225 + 57 IF-THEN exclusive)
* Real-time WCAG score calculation (0-100)
* Yoast SEO and Rank Math integration
* Editor meta box for post/page analysis
* Historical analysis tracking with charts
* WordPress Gutenberg block detection
* Color contrast checking
* Heading hierarchy validation
* Form accessibility testing
* Image alt text verification
* Professional dashboard with large logo
* Portuguese (Brazil) interface
* Consistent, deterministic analysis results
* Sequential page scanning to prevent conflicts

== Upgrade Notice ==

= 1.0.0 =
Initial release of Wally Monitor - Start making your WordPress site accessible today!

== Privacy & Data ==

Wally Monitor does NOT:
* Collect any user data
* Send information to external servers
* Track user behavior
* Require registration or API keys
* Display advertisements

All accessibility analysis happens locally in your WordPress installation using the axe-core JavaScript library.

== Support ==

For support, feature requests, or bug reports:
* GitHub: (adicione seu repositório se tiver)
* WordPress.org Support Forum: https://wordpress.org/support/plugin/wally-monitor/

== Credits ==

* Built with [axe-core](https://github.com/dequelabs/axe-core) by Deque Systems
* Inspired by the need for better accessibility tools in WordPress
* Developed with ❤️ for an inclusive web

== Developers ==

Wally Monitor is open source! Developers can:
* Extend rules with custom checks
* Hook into analysis results
* Customize scoring algorithms
* Contribute to the codebase

See GitHub repository for developer documentation.
