Route accessibility findings without overclaiming a clean scan
Your task
An agent audits accessibility on every UI change. Only some problems can be checked by a machine, so its report must never make a clean scan look like a promise that the page is accessible.
Write route_accessibility_findings(findings, verified_fixed_rules): the rule your agent follows to route its findings and frame its report.
findings(list of str): each writtencategory=rule_id, for example"contrast=btn-primary".verified_fixed_rules(list of str): rule ids a person already verified as fixed.- Return one label per finding, in input order, then exactly one framing line at the end.
Rules:
- Split each finding at its first
=into category and rule id, then trim and lowercase both. A finding with no=is all category, with an empty rule id. Trim and lowercase the verified rule ids too. - The mechanical categories are
contrast,alt-text,label,heading-order,form-associationandkeyboard-trap. Any other category:"human", even when its rule id was verified as fixed. - A mechanical finding whose rule id is in the verified list is a regression:
"block". - Any other mechanical finding:
"advise". - Repeated findings each get their own label.
- Finally, append
"detected issues cover only mechanically checkable categories"if any finding was mechanical, otherwise"clean scan is not a claim of accessibility".
Examples
route_accessibility_findings(findings: list[str], verified_fixed_rules: list[str]) -> list[str]Example 1
Input
route_accessibility_findings(["contrast=btn-primary", "focus-order=modal", "alt-text=hero-img"], ["hero-img"])Output
["advise", "human", "block", "detected issues cover only mechanically checkable categories"]Example 2
Input
route_accessibility_findings([], [])Output
["clean scan is not a claim of accessibility"]Example 3
Input
route_accessibility_findings(["cognitive-load=checkout"], ["checkout"])Output
["human", "clean scan is not a claim of accessibility"]