AccessibilityViolation Class#
Describes a single accessibility rule violation found during an audit.
public sealed record AccessibilityViolation : System.IEquatable<Motus.Abstractions.AccessibilityViolation>
Inheritance System.Object → AccessibilityViolation
Implements System.IEquatable<AccessibilityViolation>
Constructors#
AccessibilityViolation(string, AccessibilityViolationSeverity, string, string, string, Nullable<long>, string) Constructor#
Describes a single accessibility rule violation found during an audit.
public AccessibilityViolation(string RuleId, Motus.Abstractions.AccessibilityViolationSeverity Severity, string Message, string? NodeRole, string? NodeName, System.Nullable<long> BackendDOMNodeId, string? Selector);
Parameters#
RuleId System.String
The identifier of the rule that produced this violation (e.g. "a11y-alt-text").
Severity AccessibilityViolationSeverity
The severity of the violation.
Message System.String
A human-readable description of the violation.
NodeRole System.String
The ARIA role of the violating node.
NodeName System.String
The accessible name of the violating node.
BackendDOMNodeId System.Nullable<System.Int64>
The backend DOM node ID for element targeting, if available.
Selector System.String
Best-effort CSS selector for the violating element, or null.
Properties#
BackendDOMNodeId Property#
The backend DOM node ID for element targeting, if available.
public System.Nullable<long> BackendDOMNodeId { get; init; }
Property Value#
Message Property#
A human-readable description of the violation.
public string Message { get; init; }
Property Value#
NodeName Property#
The accessible name of the violating node.
public string? NodeName { get; init; }
Property Value#
NodeRole Property#
The ARIA role of the violating node.
public string? NodeRole { get; init; }
Property Value#
RuleId Property#
The identifier of the rule that produced this violation (e.g. "a11y-alt-text").
public string RuleId { get; init; }
Property Value#
Selector Property#
Best-effort CSS selector for the violating element, or null.
public string? Selector { get; init; }
Property Value#
Severity Property#
The severity of the violation.
public Motus.Abstractions.AccessibilityViolationSeverity Severity { get; init; }