pub struct Issue {
pub issue_type: IssueType,
pub message: String,
pub guideline: Option<String>,
pub element: Option<String>,
pub suggestion: Option<String>,
}Expand description
Structure representing an accessibility issue found in the HTML.
§Examples
use html_generator::accessibility::{Issue, IssueType};
let issue = Issue {
issue_type: IssueType::MissingAltText,
message: "img has no alt".into(),
guideline: Some("WCAG 1.1.1".into()),
element: Some("<img src=\"x.png\">".into()),
suggestion: Some("Add an alt attribute".into()),
};
assert_eq!(issue.issue_type, IssueType::MissingAltText);Fields§
§issue_type: IssueTypeType of accessibility issue
message: StringDescription of the issue
guideline: Option<String>WCAG guideline reference, if applicable
element: Option<String>HTML element where the issue was found
suggestion: Option<String>Suggested fix for the issue
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Issue
impl RefUnwindSafe for Issue
impl Send for Issue
impl Sync for Issue
impl Unpin for Issue
impl UnsafeUnpin for Issue
impl UnwindSafe for Issue
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more