Skip to content

Latest commit

 

History

History
executable file
·
25 lines (13 loc) · 1.55 KB

adr-015.md

File metadata and controls

executable file
·
25 lines (13 loc) · 1.55 KB

ADR 15: Use (extended) diagnostic in outcomes

Context

ACT rules mostly only care whether a given test target passes the rule or fails it (i.e. a boolean outcome). However, this does not provide any context about the reason of the failure, hence does not really help fixing the problem.

Decision

Rules will produce a diagnostic with their outcome, explaining the reason of success of failure.

At the core, a diagnostic is simply a free form text message. For more complex rules, these can be extended with any extra information that can help investigate and fix the problem. Example of extended diagnostic can include the role or accessible name found by Alfa, the contrasts between some colors, …

Not all rules need an extended diagnostic, and they should only be provided when consumers (mostly, the rest of our system) have a need for them.

Status

Accepted.

Consequences

Outcomes of audits are more actionable.

Extended diagnostics also provide a first line of introspection into Alfa results, e.g. comparing a role or a name found by Alfa with the one found by mainstream browsers.

Extended diagnostics can easily run into a "feature creep" problem, so we need to make sure that they actually provide value and are used by consumers. At the same time, we do want the diagnostics to stay within the "Alfa realm" and thus be provided independently of how consumers use them. For example, diagnostics include Element objects rather than their path or another shorthand, and consumers have to marshall them into a data format they can store or handle further.