The Rust web accessibility engine.
[dependencies]
accessibility-rs = "^0.0.49"
use accessibility_rs::{audit, AuditConfig};
// pass in raw html, optional css, bounding box clips, and locale for audit
let audit = accessibility_rs::audit(&AuditConfig::new(&html, &css, false, "en"));
Module documentation with examples.
- Accurate web accessibility WCAG audits.
- Incredibly fast nanosecond audits.
- Ideal shapes for audits that scale.
- Shortest path CSS selectors for elements.
- i18n support for multiple languages.
- Re-creating layout tree to get element position coordinates.
audit-speed/core/audit: small html (4k iterations)
time: [60.988 µs 61.067 µs 61.157 µs]
audit-speed/core/audit: medium html (4k iterations)
time: [890.56 µs 905.52 µs 923.23 µs]
audit-speed/core/audit: large html (4k iterations)
time: [1.1316 ms 1.1101 ms 1.1478 ms]
- Wasm example view kayle_innate.
- Example integrating with a headless browser.
To help improve the rules the following needs to be done:
- Add the rule to the tracking list - you can use the standards list and mappings here for help.
- Add the logic of handling the rule to wcag_rule_map and the techniques.
- Add unit test.
This project is licensed under either of
- Apache License, Version 2.0, (LICENSE_APACHE or https://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE_MIT or https://opensource.org/licenses/MIT)