Crate accessibility_rs
source ·Expand description
Audit html to see how it complies with WCAG standards.
accessibility-rs is a 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};
fn main() {
let config = AuditConfig::basic(r###"<html><body><h1>My Title</h1><input type="text" placeholder="Type me"></input><img src="tabby_cat.png"></img></body></html>"###);
let audit = audit(config);
println!("{:?}", audit);
}Modules§
- the main engine for accessibility auditing.
- locales for translations.
Structs§
- configs for the audit
Enums§
- support guidelines for auditing
Functions§
- Lookup fallback locales
- Get I18n text by locale and key
- audit a web page passing the html and css rules.