-
-
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.
chore(rules): add duplicate label for [H93]
- Loading branch information
Showing
9 changed files
with
60 additions
and
3 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = "accessibility-rs" | ||
version = "0.0.37" | ||
version = "0.0.39" | ||
authors = ["The A11yWatch Project Developers", "Jeff Mendez <[email protected]>"] | ||
edition = "2021" | ||
license = "MIT OR Apache-2.0" | ||
|
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,21 @@ | ||
//! Test for label elements. | ||
use accessibility_rs::AuditConfig; | ||
use maud::html; | ||
|
||
#[test] | ||
/// label needs unique target ids | ||
fn _audit_label_valid_name() { | ||
let markup = html! { | ||
label for="accessibility" { "My label" } | ||
input id="accessibility" type="text" placeholder="Accessibility rocks!" value="Here"; | ||
label for="accessibility" { "My label" } | ||
}; | ||
|
||
let audit = accessibility_rs::audit(AuditConfig::basic(&markup.into_string())); | ||
|
||
let valid = !audit | ||
.iter() | ||
.any(|x| x.code == "WCAGAAA.Principle1.Guideline1_3.H93"); | ||
|
||
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 |
---|---|---|
|
@@ -6,3 +6,4 @@ pub mod html; | |
pub mod img; | ||
pub mod input; | ||
pub mod meta; | ||
pub mod label; |