Download the PHP package jidaikobo/a11yc without Composer
On this page you can find all versions of the php package jidaikobo/a11yc. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download jidaikobo/a11yc
More information about jidaikobo/a11yc
Files in jidaikobo/a11yc
Package a11yc
Short Description Static accessibility checker core for A11YC
License MIT
Informations about the package a11yc
a11yc
a11yc is the core accessibility checking library extracted from A11YC.
This package is a PHP library, not the old standalone web application. It provides HTML and URL analysis APIs that can be embedded in other applications such as the standalone UI layer or the jwp-a11y WordPress plugin.
Requirements
- PHP 8.3 or later
- Composer
Installation
If you are working on this repository directly:
Compiled Resources
Runtime resource loading now expects precompiled PHP arrays in resources/compiled/.
The distributed package should include:
resources/compiled/ja.phpresources/compiled/en.php
When you change resource source files under resources/, rebuild the compiled files before committing or packaging:
This command regenerates the compiled PHP arrays from the YAML source files.
At runtime, a11yc uses the compiled files first. If they are missing, the library raises an error unless YAML fallback is explicitly enabled for development.
Development-Only YAML Fallback
For local development only, you can allow direct YAML loading with a Git-ignored config.development.php file in the package root:
This file is not intended for distribution. In normal packaged environments, keep compiled resources available and do not rely on YAML fallback.
What This Package Does
- Fetch and analyze a page by URL
- Analyze already-available HTML
- Return normalized issue lists and summary counts
- Extract image metadata used by the analyzer
- Load WCAG-related resources from bundled YAML files
Basic Usage
Analyze a URL
Analyze HTML
Result Format
Analyzer::analyzeUrl() and Analyzer::analyzeHtml() return an array with these top-level keys:
metasummaryissuesimages
meta
url: analyzed URLrequested_url: original requested URL (only foranalyzeUrl())exists: whether fetching succeeded (only foranalyzeUrl())user_agent: effective user agent stringversion:A11YC_VERSIONif definedcheck_count: number of executed checksanalyzed_at: ISO 8601 timestamp
summary
error_countnotice_countcounts_by_level
counts_by_level contains:
aaaaaa
issues
Each issue is normalized into a flat array:
idtype(errorornotice)messagelevelcriterion_keysplace_idsnippet
images
When include_images is enabled, image data includes:
elementsrcalthrefis_importantaria
Available Options
Both Analyzer::analyzeUrl() and Analyzer::analyzeHtml() accept an options array.
url: base URL for analysis (analyzeHtml()only; defaultabout:blank)user_agent: user agent used for fetching HTML/CSSchecks: array of check class names to run; omitted means all available checksis_partial: skip full-document assumptions for partial HTML analysisdo_link_check: enable slower link validation checksdo_css_check: enable CSS fetching and CSS-related checksinclude_images: include extracted image data in the result
Lower-Level API
If you need the raw validation result set before normalization:
The normalized API via Analyzer is recommended for new integrations.
License
MIT
All versions of a11yc with dependencies
guzzlehttp/guzzle Version ^7.15.2
symfony/polyfill-intl-idn Version ^1.38.1