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.
audit
is used to audit a web page for issues.
Examples
A basic WCAG audit for a website:
use accessibility_rs::{audit, AuditConfig};
fn main() {
// pass in the html, and css if the page came from a headless browser
let config = AuditConfig::basic("<html>...</html>");
let audit = audit(config);
println!("{:?}", audit);
}
Structs
- configs for the audit
Functions
- Get I18n text by locale and key
- audit a web page passing the html and css rules.