Crate accessibility_rs

source ·
Expand description

Audit html to see how it complies with WCAG standards.

Accessibility-RS is a powerful web accessibility engine that can replicate websites without a browser to get complex accessibility reports.

How to use Accessibility-RS

There are a couple of ways to use Accessibility-RS:

  • Audit perform an audit against an html page.
    • audit is used to audit a web page for issues.

Examples

A basic WCAG audit for a website:

use accessibility_rs::{audit, AuditConfig};

#[tokio::main]
async fn main() {
    // pass in the html, and css if the page came from a headless browser
    let config = AuditConfig::new_basic("<html>...</html>", ".main { background: black }");
    let audit = audit("https://rsseau.fr");
    println!("{:?}", audit);
}

Structs

Functions