Docs · API reference · Motus.Abstractions

IAccessibilityReporter Interface#

Opt-in interface for reporters that want to receive accessibility violation events. Reporters implement both IReporter and IAccessibilityReporter to receive violations alongside normal test lifecycle events.

public interface IAccessibilityReporter

Remarks#

This is a separate interface (rather than a default method on IReporter) to avoid NativeAOT trimming issues with default interface method implementations. The reporter dispatch checks reporter is IAccessibilityReporter at runtime.

Methods#

OnAccessibilityViolationAsync(AccessibilityViolation, TestInfo) Method#

Called when an accessibility violation is detected during test execution.

System.Threading.Tasks.Task OnAccessibilityViolationAsync(Motus.Abstractions.AccessibilityViolation violation, Motus.Abstractions.TestInfo test);

Parameters#

violation AccessibilityViolation

The accessibility violation details.

test TestInfo

The test that was running when the violation was detected.

Returns#

System.Threading.Tasks.Task