FAILURE MAP
← Case archive

FA-39401 / Tree accessibility / Open access

Tree indentation disclosure hit region: Disclosure zone is placed at wrong tree level · case 01

Disclosure zone is placed at wrong tree level produces the wrong hierarchical widget state in a regression fixture.

Verified by executionVariant 1 · 13 checks per implementationDownload source bundle ↓JSON ↗

ROOT CAUSE

The tree-hit-zone contract is violated at `d['depth']*d['indent']` by replacing it with `(d['depth']+1)*d['indent']`.

VERIFIED REPAIR

Restore `d['depth']*d['indent']` at this fault site while retaining the other tree state decisions.

Unsuccessful approach: The partial repair `d['indent']` still violates a boundary or preservation case.

Case contract

Hit testing is in logical row coordinates after horizontal scrolling. Disclosure zone occupies one indent unit at the row depth; row text starts after it. Leaves have no disclosure action. RTL reflects the physical x coordinate. Drag handles and editable fields take priority over row selection.

Why this case matters

Offline executable model of a hierarchical accessibility interaction; inputs are bounded and valid as stipulated. No browser, assistive technology, or normative ARIA conformance is claimed.

1 / The failure

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(d):
    local=d['width']-d['x'] if d['rtl'] else d['x']
    logical=local+d['scroll']
    start=(d['depth']+1)*d['indent']
    end=start+d['indent']
    inside=0<=d['x']<d['width'] and 0<=d['y']<d['height']
    disclosure=start<=logical<end and d['branch']
    text=logical>=end
    control=next((name for name,left,right in d['controls'] if left<=logical<right),None)
    action=('control:'+control) if control is not None else ('toggle' if disclosure else ('select' if text else 'none'))
    action=action if inside and not d['disabled'] else 'none'
    return [action,logical,start,end]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
cases = {1: [('disclosure start', {'width': 130, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['toggle', 20, 20, 30]), ('text boundary', {'width': 130, 'x': 30, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['select', 30, 20, 30]), ('leaf disclosure', {'width': 130, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': False, 'controls': [], 'disabled': False}, ['none', 20, 20, 30]), ('leaf indent', {'width': 130, 'x': 25, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': False, 'controls': [], 'disabled': False}, ['none', 25, 20, 30]), ('scrolled control', {'width': 130, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 10, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [['edit', 30, 40]], 'disabled': False}, ['control:edit', 30, 20, 30]), ('RTL', {'width': 130, 'x': 110, 'y': 3, 'rtl': True, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['toggle', 20, 20, 30]), ('scrolled', {'width': 130, 'x': 10, 'y': 3, 'rtl': False, 'scroll': 10, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['toggle', 20, 20, 30]), ('control overlay', {'width': 130, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [['edit', 20, 30]], 'disabled': False}, ['control:edit', 20, 20, 30]), ('control start', {'width': 130, 'x': 30, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [['edit', 30, 40]], 'disabled': False}, ['control:edit', 30, 20, 30]), ('right edge', {'width': 130, 'x': 130, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['none', 130, 20, 30]), ('bottom edge', {'width': 130, 'x': 40, 'y': 20, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['none', 40, 20, 30]), ('above row', {'width': 130, 'x': 40, 'y': -1, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['none', 40, 20, 30]), ('disabled', {'width': 130, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': True}, ['none', 20, 20, 30])], 2: [('disclosure start', {'width': 140, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['toggle', 20, 20, 30]), ('text boundary', {'width': 140, 'x': 30, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['select', 30, 20, 30]), ('leaf disclosure', {'width': 140, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': False, 'controls': [], 'disabled': False}, ['none', 20, 20, 30]), ('leaf indent', {'width': 140, 'x': 25, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': False, 'controls': [], 'disabled': False}, ['none', 25, 20, 30]), ('scrolled control', {'width': 140, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 10, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [['edit', 30, 40]], 'disabled': False}, ['control:edit', 30, 20, 30]), ('RTL', {'width': 140, 'x': 120, 'y': 3, 'rtl': True, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['toggle', 20, 20, 30]), ('scrolled', {'width': 140, 'x': 10, 'y': 3, 'rtl': False, 'scroll': 10, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['toggle', 20, 20, 30]), ('control overlay', {'width': 140, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [['edit', 20, 30]], 'disabled': False}, ['control:edit', 20, 20, 30]), ('control start', {'width': 140, 'x': 30, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [['edit', 30, 40]], 'disabled': False}, ['control:edit', 30, 20, 30]), ('right edge', {'width': 140, 'x': 140, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['none', 140, 20, 30]), ('bottom edge', {'width': 140, 'x': 40, 'y': 20, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['none', 40, 20, 30]), ('above row', {'width': 140, 'x': 40, 'y': -1, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['none', 40, 20, 30]), ('disabled', {'width': 140, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': True}, ['none', 20, 20, 30])], 3: [('disclosure start', {'width': 150, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['toggle', 20, 20, 30]), ('text boundary', {'width': 150, 'x': 30, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['select', 30, 20, 30]), ('leaf disclosure', {'width': 150, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': False, 'controls': [], 'disabled': False}, ['none', 20, 20, 30]), ('leaf indent', {'width': 150, 'x': 25, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': False, 'controls': [], 'disabled': False}, ['none', 25, 20, 30]), ('scrolled control', {'width': 150, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 10, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [['edit', 30, 40]], 'disabled': False}, ['control:edit', 30, 20, 30]), ('RTL', {'width': 150, 'x': 130, 'y': 3, 'rtl': True, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['toggle', 20, 20, 30]), ('scrolled', {'width': 150, 'x': 10, 'y': 3, 'rtl': False, 'scroll': 10, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['toggle', 20, 20, 30]), ('control overlay', {'width': 150, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [['edit', 20, 30]], 'disabled': False}, ['control:edit', 20, 20, 30]), ('control start', {'width': 150, 'x': 30, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [['edit', 30, 40]], 'disabled': False}, ['control:edit', 30, 20, 30]), ('right edge', {'width': 150, 'x': 150, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['none', 150, 20, 30]), ('bottom edge', {'width': 150, 'x': 40, 'y': 20, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['none', 40, 20, 30]), ('above row', {'width': 150, 'x': 40, 'y': -1, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['none', 40, 20, 30]), ('disabled', {'width': 150, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': True}, ['none', 20, 20, 30])], 4: [('disclosure start', {'width': 160, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['toggle', 20, 20, 30]), ('text boundary', {'width': 160, 'x': 30, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['select', 30, 20, 30]), ('leaf disclosure', {'width': 160, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': False, 'controls': [], 'disabled': False}, ['none', 20, 20, 30]), ('leaf indent', {'width': 160, 'x': 25, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': False, 'controls': [], 'disabled': False}, ['none', 25, 20, 30]), ('scrolled control', {'width': 160, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 10, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [['edit', 30, 40]], 'disabled': False}, ['control:edit', 30, 20, 30]), ('RTL', {'width': 160, 'x': 140, 'y': 3, 'rtl': True, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['toggle', 20, 20, 30]), ('scrolled', {'width': 160, 'x': 10, 'y': 3, 'rtl': False, 'scroll': 10, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['toggle', 20, 20, 30]), ('control overlay', {'width': 160, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [['edit', 20, 30]], 'disabled': False}, ['control:edit', 20, 20, 30]), ('control start', {'width': 160, 'x': 30, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [['edit', 30, 40]], 'disabled': False}, ['control:edit', 30, 20, 30]), ('right edge', {'width': 160, 'x': 160, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['none', 160, 20, 30]), ('bottom edge', {'width': 160, 'x': 40, 'y': 20, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['none', 40, 20, 30]), ('above row', {'width': 160, 'x': 40, 'y': -1, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['none', 40, 20, 30]), ('disabled', {'width': 160, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': True}, ['none', 20, 20, 30])], 5: [('disclosure start', {'width': 170, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['toggle', 20, 20, 30]), ('text boundary', {'width': 170, 'x': 30, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['select', 30, 20, 30]), ('leaf disclosure', {'width': 170, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': False, 'controls': [], 'disabled': False}, ['none', 20, 20, 30]), ('leaf indent', {'width': 170, 'x': 25, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': False, 'controls': [], 'disabled': False}, ['none', 25, 20, 30]), ('scrolled control', {'width': 170, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 10, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [['edit', 30, 40]], 'disabled': False}, ['control:edit', 30, 20, 30]), ('RTL', {'width': 170, 'x': 150, 'y': 3, 'rtl': True, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['toggle', 20, 20, 30]), ('scrolled', {'width': 170, 'x': 10, 'y': 3, 'rtl': False, 'scroll': 10, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['toggle', 20, 20, 30]), ('control overlay', {'width': 170, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [['edit', 20, 30]], 'disabled': False}, ['control:edit', 20, 20, 30]), ('control start', {'width': 170, 'x': 30, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [['edit', 30, 40]], 'disabled': False}, ['control:edit', 30, 20, 30]), ('right edge', {'width': 170, 'x': 170, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['none', 170, 20, 30]), ('bottom edge', {'width': 170, 'x': 40, 'y': 20, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['none', 40, 20, 30]), ('above row', {'width': 170, 'x': 40, 'y': -1, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['none', 40, 20, 30]), ('disabled', {'width': 170, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': True}, ['none', 20, 20, 30])]}
for label, data, expected in cases[N]:
    check(label, solve(data), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
disclosure start['none', 20, 30, 40]['toggle', 20, 20, 30]Failed
text boundary['toggle', 30, 30, 40]['select', 30, 20, 30]Failed
leaf disclosure['none', 20, 30, 40]['none', 20, 20, 30]Failed
leaf indent['none', 25, 30, 40]['none', 25, 20, 30]Failed
scrolled control['control:edit', 30, 30, 40]['control:edit', 30, 20, 30]Failed
RTL['none', 20, 30, 40]['toggle', 20, 20, 30]Failed
scrolled['none', 20, 30, 40]['toggle', 20, 20, 30]Failed
control overlay['control:edit', 20, 30, 40]['control:edit', 20, 20, 30]Failed
control start['control:edit', 30, 30, 40]['control:edit', 30, 20, 30]Failed
right edge['none', 130, 30, 40]['none', 130, 20, 30]Failed
bottom edge['none', 40, 30, 40]['none', 40, 20, 30]Failed
above row['none', 40, 30, 40]['none', 40, 20, 30]Failed
disabled['none', 20, 30, 40]['none', 20, 20, 30]Failed

SHA-256 / 39da5715656f63d8ad22a535bfadb5ce2e1fa682073cd797e63acbf113d46c34

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(d):
    local=d['width']-d['x'] if d['rtl'] else d['x']
    logical=local+d['scroll']
    start=d['indent']
    end=start+d['indent']
    inside=0<=d['x']<d['width'] and 0<=d['y']<d['height']
    disclosure=start<=logical<end and d['branch']
    text=logical>=end
    control=next((name for name,left,right in d['controls'] if left<=logical<right),None)
    action=('control:'+control) if control is not None else ('toggle' if disclosure else ('select' if text else 'none'))
    action=action if inside and not d['disabled'] else 'none'
    return [action,logical,start,end]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
cases = {1: [('disclosure start', {'width': 130, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['toggle', 20, 20, 30]), ('text boundary', {'width': 130, 'x': 30, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['select', 30, 20, 30]), ('leaf disclosure', {'width': 130, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': False, 'controls': [], 'disabled': False}, ['none', 20, 20, 30]), ('leaf indent', {'width': 130, 'x': 25, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': False, 'controls': [], 'disabled': False}, ['none', 25, 20, 30]), ('scrolled control', {'width': 130, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 10, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [['edit', 30, 40]], 'disabled': False}, ['control:edit', 30, 20, 30]), ('RTL', {'width': 130, 'x': 110, 'y': 3, 'rtl': True, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['toggle', 20, 20, 30]), ('scrolled', {'width': 130, 'x': 10, 'y': 3, 'rtl': False, 'scroll': 10, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['toggle', 20, 20, 30]), ('control overlay', {'width': 130, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [['edit', 20, 30]], 'disabled': False}, ['control:edit', 20, 20, 30]), ('control start', {'width': 130, 'x': 30, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [['edit', 30, 40]], 'disabled': False}, ['control:edit', 30, 20, 30]), ('right edge', {'width': 130, 'x': 130, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['none', 130, 20, 30]), ('bottom edge', {'width': 130, 'x': 40, 'y': 20, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['none', 40, 20, 30]), ('above row', {'width': 130, 'x': 40, 'y': -1, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['none', 40, 20, 30]), ('disabled', {'width': 130, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': True}, ['none', 20, 20, 30])], 2: [('disclosure start', {'width': 140, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['toggle', 20, 20, 30]), ('text boundary', {'width': 140, 'x': 30, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['select', 30, 20, 30]), ('leaf disclosure', {'width': 140, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': False, 'controls': [], 'disabled': False}, ['none', 20, 20, 30]), ('leaf indent', {'width': 140, 'x': 25, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': False, 'controls': [], 'disabled': False}, ['none', 25, 20, 30]), ('scrolled control', {'width': 140, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 10, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [['edit', 30, 40]], 'disabled': False}, ['control:edit', 30, 20, 30]), ('RTL', {'width': 140, 'x': 120, 'y': 3, 'rtl': True, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['toggle', 20, 20, 30]), ('scrolled', {'width': 140, 'x': 10, 'y': 3, 'rtl': False, 'scroll': 10, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['toggle', 20, 20, 30]), ('control overlay', {'width': 140, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [['edit', 20, 30]], 'disabled': False}, ['control:edit', 20, 20, 30]), ('control start', {'width': 140, 'x': 30, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [['edit', 30, 40]], 'disabled': False}, ['control:edit', 30, 20, 30]), ('right edge', {'width': 140, 'x': 140, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['none', 140, 20, 30]), ('bottom edge', {'width': 140, 'x': 40, 'y': 20, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['none', 40, 20, 30]), ('above row', {'width': 140, 'x': 40, 'y': -1, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['none', 40, 20, 30]), ('disabled', {'width': 140, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': True}, ['none', 20, 20, 30])], 3: [('disclosure start', {'width': 150, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['toggle', 20, 20, 30]), ('text boundary', {'width': 150, 'x': 30, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['select', 30, 20, 30]), ('leaf disclosure', {'width': 150, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': False, 'controls': [], 'disabled': False}, ['none', 20, 20, 30]), ('leaf indent', {'width': 150, 'x': 25, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': False, 'controls': [], 'disabled': False}, ['none', 25, 20, 30]), ('scrolled control', {'width': 150, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 10, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [['edit', 30, 40]], 'disabled': False}, ['control:edit', 30, 20, 30]), ('RTL', {'width': 150, 'x': 130, 'y': 3, 'rtl': True, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['toggle', 20, 20, 30]), ('scrolled', {'width': 150, 'x': 10, 'y': 3, 'rtl': False, 'scroll': 10, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['toggle', 20, 20, 30]), ('control overlay', {'width': 150, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [['edit', 20, 30]], 'disabled': False}, ['control:edit', 20, 20, 30]), ('control start', {'width': 150, 'x': 30, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [['edit', 30, 40]], 'disabled': False}, ['control:edit', 30, 20, 30]), ('right edge', {'width': 150, 'x': 150, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['none', 150, 20, 30]), ('bottom edge', {'width': 150, 'x': 40, 'y': 20, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['none', 40, 20, 30]), ('above row', {'width': 150, 'x': 40, 'y': -1, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['none', 40, 20, 30]), ('disabled', {'width': 150, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': True}, ['none', 20, 20, 30])], 4: [('disclosure start', {'width': 160, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['toggle', 20, 20, 30]), ('text boundary', {'width': 160, 'x': 30, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['select', 30, 20, 30]), ('leaf disclosure', {'width': 160, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': False, 'controls': [], 'disabled': False}, ['none', 20, 20, 30]), ('leaf indent', {'width': 160, 'x': 25, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': False, 'controls': [], 'disabled': False}, ['none', 25, 20, 30]), ('scrolled control', {'width': 160, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 10, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [['edit', 30, 40]], 'disabled': False}, ['control:edit', 30, 20, 30]), ('RTL', {'width': 160, 'x': 140, 'y': 3, 'rtl': True, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['toggle', 20, 20, 30]), ('scrolled', {'width': 160, 'x': 10, 'y': 3, 'rtl': False, 'scroll': 10, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['toggle', 20, 20, 30]), ('control overlay', {'width': 160, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [['edit', 20, 30]], 'disabled': False}, ['control:edit', 20, 20, 30]), ('control start', {'width': 160, 'x': 30, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [['edit', 30, 40]], 'disabled': False}, ['control:edit', 30, 20, 30]), ('right edge', {'width': 160, 'x': 160, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['none', 160, 20, 30]), ('bottom edge', {'width': 160, 'x': 40, 'y': 20, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['none', 40, 20, 30]), ('above row', {'width': 160, 'x': 40, 'y': -1, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['none', 40, 20, 30]), ('disabled', {'width': 160, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': True}, ['none', 20, 20, 30])], 5: [('disclosure start', {'width': 170, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['toggle', 20, 20, 30]), ('text boundary', {'width': 170, 'x': 30, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['select', 30, 20, 30]), ('leaf disclosure', {'width': 170, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': False, 'controls': [], 'disabled': False}, ['none', 20, 20, 30]), ('leaf indent', {'width': 170, 'x': 25, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': False, 'controls': [], 'disabled': False}, ['none', 25, 20, 30]), ('scrolled control', {'width': 170, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 10, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [['edit', 30, 40]], 'disabled': False}, ['control:edit', 30, 20, 30]), ('RTL', {'width': 170, 'x': 150, 'y': 3, 'rtl': True, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['toggle', 20, 20, 30]), ('scrolled', {'width': 170, 'x': 10, 'y': 3, 'rtl': False, 'scroll': 10, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['toggle', 20, 20, 30]), ('control overlay', {'width': 170, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [['edit', 20, 30]], 'disabled': False}, ['control:edit', 20, 20, 30]), ('control start', {'width': 170, 'x': 30, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [['edit', 30, 40]], 'disabled': False}, ['control:edit', 30, 20, 30]), ('right edge', {'width': 170, 'x': 170, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['none', 170, 20, 30]), ('bottom edge', {'width': 170, 'x': 40, 'y': 20, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['none', 40, 20, 30]), ('above row', {'width': 170, 'x': 40, 'y': -1, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['none', 40, 20, 30]), ('disabled', {'width': 170, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': True}, ['none', 20, 20, 30])]}
for label, data, expected in cases[N]:
    check(label, solve(data), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
disclosure start['select', 20, 10, 20]['toggle', 20, 20, 30]Failed
text boundary['select', 30, 10, 20]['select', 30, 20, 30]Failed
leaf disclosure['select', 20, 10, 20]['none', 20, 20, 30]Failed
leaf indent['select', 25, 10, 20]['none', 25, 20, 30]Failed
scrolled control['control:edit', 30, 10, 20]['control:edit', 30, 20, 30]Failed
RTL['select', 20, 10, 20]['toggle', 20, 20, 30]Failed
scrolled['select', 20, 10, 20]['toggle', 20, 20, 30]Failed
control overlay['control:edit', 20, 10, 20]['control:edit', 20, 20, 30]Failed
control start['control:edit', 30, 10, 20]['control:edit', 30, 20, 30]Failed
right edge['none', 130, 10, 20]['none', 130, 20, 30]Failed
bottom edge['none', 40, 10, 20]['none', 40, 20, 30]Failed
above row['none', 40, 10, 20]['none', 40, 20, 30]Failed
disabled['none', 20, 10, 20]['none', 20, 20, 30]Failed

SHA-256 / f0617a421c75a6c852a40a17d81b057e1a03b66f92ee24e6f0c151bba3c53068

3 / The verified repair

Exit 0
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(d):
    local=d['width']-d['x'] if d['rtl'] else d['x']
    logical=local+d['scroll']
    start=d['depth']*d['indent']
    end=start+d['indent']
    inside=0<=d['x']<d['width'] and 0<=d['y']<d['height']
    disclosure=start<=logical<end and d['branch']
    text=logical>=end
    control=next((name for name,left,right in d['controls'] if left<=logical<right),None)
    action=('control:'+control) if control is not None else ('toggle' if disclosure else ('select' if text else 'none'))
    action=action if inside and not d['disabled'] else 'none'
    return [action,logical,start,end]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
cases = {1: [('disclosure start', {'width': 130, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['toggle', 20, 20, 30]), ('text boundary', {'width': 130, 'x': 30, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['select', 30, 20, 30]), ('leaf disclosure', {'width': 130, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': False, 'controls': [], 'disabled': False}, ['none', 20, 20, 30]), ('leaf indent', {'width': 130, 'x': 25, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': False, 'controls': [], 'disabled': False}, ['none', 25, 20, 30]), ('scrolled control', {'width': 130, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 10, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [['edit', 30, 40]], 'disabled': False}, ['control:edit', 30, 20, 30]), ('RTL', {'width': 130, 'x': 110, 'y': 3, 'rtl': True, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['toggle', 20, 20, 30]), ('scrolled', {'width': 130, 'x': 10, 'y': 3, 'rtl': False, 'scroll': 10, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['toggle', 20, 20, 30]), ('control overlay', {'width': 130, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [['edit', 20, 30]], 'disabled': False}, ['control:edit', 20, 20, 30]), ('control start', {'width': 130, 'x': 30, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [['edit', 30, 40]], 'disabled': False}, ['control:edit', 30, 20, 30]), ('right edge', {'width': 130, 'x': 130, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['none', 130, 20, 30]), ('bottom edge', {'width': 130, 'x': 40, 'y': 20, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['none', 40, 20, 30]), ('above row', {'width': 130, 'x': 40, 'y': -1, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['none', 40, 20, 30]), ('disabled', {'width': 130, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': True}, ['none', 20, 20, 30])], 2: [('disclosure start', {'width': 140, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['toggle', 20, 20, 30]), ('text boundary', {'width': 140, 'x': 30, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['select', 30, 20, 30]), ('leaf disclosure', {'width': 140, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': False, 'controls': [], 'disabled': False}, ['none', 20, 20, 30]), ('leaf indent', {'width': 140, 'x': 25, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': False, 'controls': [], 'disabled': False}, ['none', 25, 20, 30]), ('scrolled control', {'width': 140, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 10, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [['edit', 30, 40]], 'disabled': False}, ['control:edit', 30, 20, 30]), ('RTL', {'width': 140, 'x': 120, 'y': 3, 'rtl': True, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['toggle', 20, 20, 30]), ('scrolled', {'width': 140, 'x': 10, 'y': 3, 'rtl': False, 'scroll': 10, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['toggle', 20, 20, 30]), ('control overlay', {'width': 140, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [['edit', 20, 30]], 'disabled': False}, ['control:edit', 20, 20, 30]), ('control start', {'width': 140, 'x': 30, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [['edit', 30, 40]], 'disabled': False}, ['control:edit', 30, 20, 30]), ('right edge', {'width': 140, 'x': 140, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['none', 140, 20, 30]), ('bottom edge', {'width': 140, 'x': 40, 'y': 20, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['none', 40, 20, 30]), ('above row', {'width': 140, 'x': 40, 'y': -1, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['none', 40, 20, 30]), ('disabled', {'width': 140, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': True}, ['none', 20, 20, 30])], 3: [('disclosure start', {'width': 150, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['toggle', 20, 20, 30]), ('text boundary', {'width': 150, 'x': 30, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['select', 30, 20, 30]), ('leaf disclosure', {'width': 150, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': False, 'controls': [], 'disabled': False}, ['none', 20, 20, 30]), ('leaf indent', {'width': 150, 'x': 25, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': False, 'controls': [], 'disabled': False}, ['none', 25, 20, 30]), ('scrolled control', {'width': 150, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 10, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [['edit', 30, 40]], 'disabled': False}, ['control:edit', 30, 20, 30]), ('RTL', {'width': 150, 'x': 130, 'y': 3, 'rtl': True, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['toggle', 20, 20, 30]), ('scrolled', {'width': 150, 'x': 10, 'y': 3, 'rtl': False, 'scroll': 10, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['toggle', 20, 20, 30]), ('control overlay', {'width': 150, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [['edit', 20, 30]], 'disabled': False}, ['control:edit', 20, 20, 30]), ('control start', {'width': 150, 'x': 30, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [['edit', 30, 40]], 'disabled': False}, ['control:edit', 30, 20, 30]), ('right edge', {'width': 150, 'x': 150, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['none', 150, 20, 30]), ('bottom edge', {'width': 150, 'x': 40, 'y': 20, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['none', 40, 20, 30]), ('above row', {'width': 150, 'x': 40, 'y': -1, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['none', 40, 20, 30]), ('disabled', {'width': 150, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': True}, ['none', 20, 20, 30])], 4: [('disclosure start', {'width': 160, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['toggle', 20, 20, 30]), ('text boundary', {'width': 160, 'x': 30, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['select', 30, 20, 30]), ('leaf disclosure', {'width': 160, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': False, 'controls': [], 'disabled': False}, ['none', 20, 20, 30]), ('leaf indent', {'width': 160, 'x': 25, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': False, 'controls': [], 'disabled': False}, ['none', 25, 20, 30]), ('scrolled control', {'width': 160, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 10, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [['edit', 30, 40]], 'disabled': False}, ['control:edit', 30, 20, 30]), ('RTL', {'width': 160, 'x': 140, 'y': 3, 'rtl': True, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['toggle', 20, 20, 30]), ('scrolled', {'width': 160, 'x': 10, 'y': 3, 'rtl': False, 'scroll': 10, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['toggle', 20, 20, 30]), ('control overlay', {'width': 160, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [['edit', 20, 30]], 'disabled': False}, ['control:edit', 20, 20, 30]), ('control start', {'width': 160, 'x': 30, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [['edit', 30, 40]], 'disabled': False}, ['control:edit', 30, 20, 30]), ('right edge', {'width': 160, 'x': 160, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['none', 160, 20, 30]), ('bottom edge', {'width': 160, 'x': 40, 'y': 20, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['none', 40, 20, 30]), ('above row', {'width': 160, 'x': 40, 'y': -1, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['none', 40, 20, 30]), ('disabled', {'width': 160, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': True}, ['none', 20, 20, 30])], 5: [('disclosure start', {'width': 170, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['toggle', 20, 20, 30]), ('text boundary', {'width': 170, 'x': 30, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['select', 30, 20, 30]), ('leaf disclosure', {'width': 170, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': False, 'controls': [], 'disabled': False}, ['none', 20, 20, 30]), ('leaf indent', {'width': 170, 'x': 25, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': False, 'controls': [], 'disabled': False}, ['none', 25, 20, 30]), ('scrolled control', {'width': 170, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 10, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [['edit', 30, 40]], 'disabled': False}, ['control:edit', 30, 20, 30]), ('RTL', {'width': 170, 'x': 150, 'y': 3, 'rtl': True, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['toggle', 20, 20, 30]), ('scrolled', {'width': 170, 'x': 10, 'y': 3, 'rtl': False, 'scroll': 10, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['toggle', 20, 20, 30]), ('control overlay', {'width': 170, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [['edit', 20, 30]], 'disabled': False}, ['control:edit', 20, 20, 30]), ('control start', {'width': 170, 'x': 30, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [['edit', 30, 40]], 'disabled': False}, ['control:edit', 30, 20, 30]), ('right edge', {'width': 170, 'x': 170, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['none', 170, 20, 30]), ('bottom edge', {'width': 170, 'x': 40, 'y': 20, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['none', 40, 20, 30]), ('above row', {'width': 170, 'x': 40, 'y': -1, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['none', 40, 20, 30]), ('disabled', {'width': 170, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': True}, ['none', 20, 20, 30])]}
for label, data, expected in cases[N]:
    check(label, solve(data), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
disclosure start['toggle', 20, 20, 30]['toggle', 20, 20, 30]Passed
text boundary['select', 30, 20, 30]['select', 30, 20, 30]Passed
leaf disclosure['none', 20, 20, 30]['none', 20, 20, 30]Passed
leaf indent['none', 25, 20, 30]['none', 25, 20, 30]Passed
scrolled control['control:edit', 30, 20, 30]['control:edit', 30, 20, 30]Passed
RTL['toggle', 20, 20, 30]['toggle', 20, 20, 30]Passed
scrolled['toggle', 20, 20, 30]['toggle', 20, 20, 30]Passed
control overlay['control:edit', 20, 20, 30]['control:edit', 20, 20, 30]Passed
control start['control:edit', 30, 20, 30]['control:edit', 30, 20, 30]Passed
right edge['none', 130, 20, 30]['none', 130, 20, 30]Passed
bottom edge['none', 40, 20, 30]['none', 40, 20, 30]Passed
above row['none', 40, 20, 30]['none', 40, 20, 30]Passed
disabled['none', 20, 20, 30]['none', 20, 20, 30]Passed

SHA-256 / 20304ba39a6e1e4bffabb379ff1e7f67c5ca068994eac00355b418c4c7a0b015

Verification & scope

Synthetic deterministic hierarchical-widget data contract; not an implementation of a browser accessibility tree. This reproducer isolates one failure mechanism. Results cover the supplied fixtures. Variants within a family share a test contract and should remain grouped when constructing evaluation splits. Related mechanisms with a shared evaluation_group must also remain together; these controlled models are not independent production incidents.

Observations recorded using Python 3.12.14 at 2026-09-29T14:43:20.795803+00:00.

Case digest / 9c83f550cb1c088b4f4952061f920783cebb9b1a190b651a2a262d69db9b6eed