PHP code example of jidaikobo / a11yc

1. Go to this page and download the library: Download jidaikobo/a11yc library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

jidaikobo / a11yc example snippets




return array(
    'allow_yaml_fallback' => true,
);



idaikobo\A11yc\Analyzer;

$analyzer = new Analyzer();

$result = $analyzer->analyzeUrl('https://example.com/', array(
    'do_link_check' => false,
    'do_css_check' => false,
    '



idaikobo\A11yc\Analyzer;

$html = '<!doctype html><html lang="ja"><head><title>Example</title></head><body><img src="/logo.png" alt=""></body></html>';

$analyzer = new Analyzer();

$result = $analyzer->analyzeHtml($html, array(
    'url' => 'https://example.com/',
    'is_partial' => false,
    'do_link_check' => false,
    'do_css_check' => false,
    '



use Jidaikobo\A11yc\Validate;

$resultSet = Validate::html(
    'https://example.com/',
    $html,
    array(),
    'using',
    true,
    array(
        'is_partial' => false,
        'do_link_check' => false,
        'do_css_check' => false,
    )
);