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.
auditis 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
- configs for the audit
- The configuration for auditing
- Wrapper around a reference to an element node.
- Details of the problem
Functions
- Get I18n text by locale and key
- audit a web page passing the html and css rules.