-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
86 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
//! Test generic html elements | ||
use accessibility_rs::AuditConfig; | ||
|
||
#[test] | ||
/// duplicate html elements | ||
fn _audit_duplicate_element_id() { | ||
let audit = accessibility_rs::audit(AuditConfig::basic( | ||
r###"<html lang="en"> | ||
<head> | ||
<title>Duplicate ID: Do not Use.</title> | ||
</head> | ||
<body> | ||
<div id="dog"></div> | ||
<div id="dog"></div> | ||
</body> | ||
</html>"###, | ||
)); | ||
let mut valid = true; | ||
|
||
for x in &audit { | ||
println!("{:?}", x); | ||
if x.code == "WCAGAAA.Principle4.Guideline4_1.F77" { | ||
valid = false; | ||
break; | ||
} | ||
} | ||
|
||
assert_eq!(valid, false) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
pub mod anchor; | ||
pub mod heading; | ||
pub mod html; | ||
pub mod img; | ||
pub mod meta; |