hamzaaqq / openqa-toolkit
Lightweight PHP CLI for HTML quality checks, accessibility heuristics, HTTP headers and Laravel/CI integration.
Requires
- php: >=8.2
- ext-curl: *
- ext-dom: *
Requires (Dev)
- orchestra/testbench: ^10.0 || ^11.0
Suggests
- laravel/framework: Optional Artisan view auditing in Laravel applications (12.x or 13.x).
Provides
None
Conflicts
None
Replaces
None
README
OpenQA Toolkit is a lightweight, open-source PHP CLI for website quality assurance: HTML quality checks, accessibility-related heuristics, local anchor validation and advisory HTTP security-header review. Audit local HTML, rendered Laravel Blade views or generated pages in GitHub Actions.
Official documentation · Quick start · Integrations · Packagist · Contribute
composer require --dev hamzaaqq/openqa-toolkit:^0.1
Documentation website source lives in site/. See the Pages deployment workflow for publication status.
Quick start
Requires PHP 8.2+ with DOM and cURL extensions. No external PHP packages needed.
git clone https://github.com/Hamzaaqq/openqa-toolkit.git
cd openqa-toolkit
php bin/openqa html examples/sample.html
php bin/openqa html examples/sample.html --json
The example intentionally contains three findings: missing image alt, a duplicate ID, and a missing local anchor.
For a site you own or have permission to test:
php bin/openqa url https://example.com --authorized --json
URL mode makes one HTTP GET request, does not follow redirects, times out after 15 seconds and limits the response body to 2 MiB. It reports HTTP status, elapsed request time and advisory security headers. HTML is analyzed only for successful HTML responses.
Checks
- Missing page title, document language and image alt attributes.
- Duplicate IDs, empty anchor hrefs and unresolved local fragments.
- Missing CSP, Referrer-Policy, X-Content-Type-Options and (HTTPS only) HSTS headers.
- HTTP status and elapsed time in URL mode.
Exit codes: 0 no findings; 1 findings; 2 usage or operational error. JSON mode is suitable for CI. Findings are prompts for manual review, not proof of accessibility compliance or vulnerabilities.
Install as a Composer CLI
The package is registered on Packagist. Install the published release in a separate project with composer require --dev hamzaaqq/openqa-toolkit:^0.1. Alternatively, install from Git:
composer config repositories.openqa vcs https://github.com/Hamzaaqq/openqa-toolkit composer require --dev hamzaaqq/openqa-toolkit:dev-main
Run vendor/bin/openqa --version (Windows Command Prompt: vendor\bin\openqa.bat --version). See the v0.1.0 release.
See the first audit tutorial for a practical offline exercise and release checklist for publication steps.
Integrations
- Laravel Artisan integration: audit rendered Blade views locally with
php artisan openqa:view welcome --json. - Reusable GitHub Action: audit generated HTML files in CI and export JSON findings.
Both integrations are optional. See the integration workflow for test coverage and current CI results.
Help improve OpenQA
Try the five-minute offline exercise and tell us what worked or failed on your platform. We welcome reproducible feedback and small contributions, especially Windows installation checks, anchor regression tests, and local HTTP integration tests. Check the issue discussion before starting work.
Development
php tests/run.php
See contribution guidelines and roadmap. This is an early version. It does not execute JavaScript, crawl sites, verify external links, or measure browser performance. Never expose the URL checker as an untrusted public web service; it can reach networks available to the local machine.
License
MIT.