AccessibilityAuditContext Class#
Provides rules with access to the full tree and the page during an audit.
public sealed record AccessibilityAuditContext : System.IEquatable<Motus.Abstractions.AccessibilityAuditContext>
Inheritance System.Object → AccessibilityAuditContext
Implements System.IEquatable<AccessibilityAuditContext>
Constructors#
AccessibilityAuditContext(IReadOnlyList<AccessibilityNode>, IPage, IReadOnlyDictionary<long,ComputedStyleInfo>, IReadOnlySet<string>, string) Constructor#
Provides rules with access to the full tree and the page during an audit.
public AccessibilityAuditContext(System.Collections.Generic.IReadOnlyList<Motus.Abstractions.AccessibilityNode> AllNodes, Motus.Abstractions.IPage Page, System.Collections.Generic.IReadOnlyDictionary<long,Motus.Abstractions.ComputedStyleInfo>? ComputedStyles=null, System.Collections.Generic.IReadOnlySet<string>? DuplicateIds=null, string? DocumentLanguage=null);
Parameters#
AllNodes System.Collections.Generic.IReadOnlyList<AccessibilityNode>
All walkable nodes in the accessibility tree, in depth-first order.
Page IPage
The page being audited, for computed-style queries.
ComputedStyles System.Collections.Generic.IReadOnlyDictionary<System.Int64,ComputedStyleInfo>
Pre-fetched computed styles keyed by BackendDOMNodeId.
DuplicateIds System.Collections.Generic.IReadOnlySet<System.String>
Set of HTML id values that appear more than once in the document.
DocumentLanguage System.String
The lang attribute value of the document element, or null if absent.
Properties#
AllNodes Property#
All walkable nodes in the accessibility tree, in depth-first order.
public System.Collections.Generic.IReadOnlyList<Motus.Abstractions.AccessibilityNode> AllNodes { get; init; }
Property Value#
System.Collections.Generic.IReadOnlyList<AccessibilityNode>
ComputedStyles Property#
Pre-fetched computed styles keyed by BackendDOMNodeId.
public System.Collections.Generic.IReadOnlyDictionary<long,Motus.Abstractions.ComputedStyleInfo>? ComputedStyles { get; init; }
Property Value#
System.Collections.Generic.IReadOnlyDictionary<System.Int64,ComputedStyleInfo>
DocumentLanguage Property#
The lang attribute value of the document element, or null if absent.
public string? DocumentLanguage { get; init; }
Property Value#
DuplicateIds Property#
Set of HTML id values that appear more than once in the document.
public System.Collections.Generic.IReadOnlySet<string>? DuplicateIds { get; init; }
Property Value#
System.Collections.Generic.IReadOnlySet<System.String>
Page Property#
The page being audited, for computed-style queries.
public Motus.Abstractions.IPage Page { get; init; }