FAILURE MAP
← Case archive

FA-54226 / Accessibility interaction semantics / Open access

Negative routing coordinates select the last displayed cell · case 01

Negative routing coordinates select the last displayed cell.

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

ROOT CAUSE

The negative routing decision in the braille routing adapter violates its declared contract.

VERIFIED REPAIR

Apply the exact contract at the negative routing decision: 0 <= route < len(window)

Unsuccessful approach: The local repair substitutes -1 <= route < len(window) but still mishandles the regression fixtures.

Case contract

Input [cells,offset,width,route] where cells [source_start,source_end,content,editable]. Clip display window by nonnegative offset and width. Each cell has one display position regardless of content length. Routing uses a zero-based position inside displayed cells; return None if outside window or cell not editable, otherwise [source_start,source_end]. Display contents replace empty cell content with a space; protected content (exact token SECRET) displays a bullet. Return [display,source_ranges,route_result,has_previous,has_next]. Source ranges preserve zero-width insertion cells.

Why this case matters

Offline accessibility bridge model with explicit policy; useful for testing semantic API adapters independently of browser implementations.

1 / The failure

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

N = 1
observations = []
def solve(data):
    cells,offset,width,route = data
    offset,width = max(0,offset),max(0,width)
    window = cells[offset:offset+width]
    contents = [('•' if c == 'SECRET' else (c if c else ' ')) for s,e,c,editable in window]
    ranges = [[s,e] for s,e,c,editable in window]
    routed = None
    if -len(window) <= route < len(window):
        s,e,c,editable = window[route]
        if editable: routed = [s,e]
    return [contents,ranges,routed,offset>0,offset+len(window)<len(cells)]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('contract fixture 1', solve([[[0,N,'ab',True],[N,N+2,'SECRET',False],[N+2,N+2,'',True]],1,2,1],), [['•',' '],[[N,N+2],[N+2,N+2]],[N+2,N+2],True,False])
check('contract fixture 2', solve([[[0,2,'ab',True],[2,3,'c',True],[3,4,'d',True]],0,2,0],), [['ab','c'],[[0,2],[2,3]],[0,2],False,True])
check('contract fixture 3', solve([[[0,1,'x',False]],0,1,0],), [['x'],[[0,1]],None,False,False])
check('contract fixture 4', solve([[[0,1,'x',True]],0,1,-1],), [['x'],[[0,1]],None,False,False])
check('contract fixture 5', solve([[[0,1,'x',True]],0,1,1],), [['x'],[[0,1]],None,False,False])
check('contract fixture 6', solve([[[0,1,'x',True]],-2,0,0],), [[],[],None,False,True])
check('contract fixture 7', solve([[[0,1,'a',True],[1,2,'b',True]],-1,1,0],), [['a'],[[0,1]],[0,1],False,True])
check('contract fixture 8', solve([[],0,4,0],), [[],[],None,False,False])
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
contract fixture 1[['•', ' '], [[1, 3], [3, 3]], [3, 3], True, False][['•', ' '], [[1, 3], [3, 3]], [3, 3], True, False]Passed
contract fixture 2[['ab', 'c'], [[0, 2], [2, 3]], [0, 2], False, True][['ab', 'c'], [[0, 2], [2, 3]], [0, 2], False, True]Passed
contract fixture 3[['x'], [[0, 1]], None, False, False][['x'], [[0, 1]], None, False, False]Passed
contract fixture 4[['x'], [[0, 1]], [0, 1], False, False][['x'], [[0, 1]], None, False, False]Failed
contract fixture 5[['x'], [[0, 1]], None, False, False][['x'], [[0, 1]], None, False, False]Passed
contract fixture 6[[], [], None, False, True][[], [], None, False, True]Passed
contract fixture 7[['a'], [[0, 1]], [0, 1], False, True][['a'], [[0, 1]], [0, 1], False, True]Passed
contract fixture 8[[], [], None, False, False][[], [], None, False, False]Passed

SHA-256 / 02b711fd8c813f0ce646c0acc45d72da58109ca9244e39f0e32e8a6e0dc91054

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(data):
    cells,offset,width,route = data
    offset,width = max(0,offset),max(0,width)
    window = cells[offset:offset+width]
    contents = [('•' if c == 'SECRET' else (c if c else ' ')) for s,e,c,editable in window]
    ranges = [[s,e] for s,e,c,editable in window]
    routed = None
    if -1 <= route < len(window):
        s,e,c,editable = window[route]
        if editable: routed = [s,e]
    return [contents,ranges,routed,offset>0,offset+len(window)<len(cells)]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('contract fixture 1', solve([[[0,N,'ab',True],[N,N+2,'SECRET',False],[N+2,N+2,'',True]],1,2,1],), [['•',' '],[[N,N+2],[N+2,N+2]],[N+2,N+2],True,False])
check('contract fixture 2', solve([[[0,2,'ab',True],[2,3,'c',True],[3,4,'d',True]],0,2,0],), [['ab','c'],[[0,2],[2,3]],[0,2],False,True])
check('contract fixture 3', solve([[[0,1,'x',False]],0,1,0],), [['x'],[[0,1]],None,False,False])
check('contract fixture 4', solve([[[0,1,'x',True]],0,1,-1],), [['x'],[[0,1]],None,False,False])
check('contract fixture 5', solve([[[0,1,'x',True]],0,1,1],), [['x'],[[0,1]],None,False,False])
check('contract fixture 6', solve([[[0,1,'x',True]],-2,0,0],), [[],[],None,False,True])
check('contract fixture 7', solve([[[0,1,'a',True],[1,2,'b',True]],-1,1,0],), [['a'],[[0,1]],[0,1],False,True])
check('contract fixture 8', solve([[],0,4,0],), [[],[],None,False,False])
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
contract fixture 1[['•', ' '], [[1, 3], [3, 3]], [3, 3], True, False][['•', ' '], [[1, 3], [3, 3]], [3, 3], True, False]Passed
contract fixture 2[['ab', 'c'], [[0, 2], [2, 3]], [0, 2], False, True][['ab', 'c'], [[0, 2], [2, 3]], [0, 2], False, True]Passed
contract fixture 3[['x'], [[0, 1]], None, False, False][['x'], [[0, 1]], None, False, False]Passed
contract fixture 4[['x'], [[0, 1]], [0, 1], False, False][['x'], [[0, 1]], None, False, False]Failed
contract fixture 5[['x'], [[0, 1]], None, False, False][['x'], [[0, 1]], None, False, False]Passed
contract fixture 6[[], [], None, False, True][[], [], None, False, True]Passed
contract fixture 7[['a'], [[0, 1]], [0, 1], False, True][['a'], [[0, 1]], [0, 1], False, True]Passed
contract fixture 8[[], [], None, False, False][[], [], None, False, False]Passed

SHA-256 / 98ca1eb5c393023c9093991e9e197ec68acf430fed056a7783d7d39d250bd520

3 / The verified repair

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

N = 1
observations = []
def solve(data):
    cells,offset,width,route = data
    offset,width = max(0,offset),max(0,width)
    window = cells[offset:offset+width]
    contents = [('•' if c == 'SECRET' else (c if c else ' ')) for s,e,c,editable in window]
    ranges = [[s,e] for s,e,c,editable in window]
    routed = None
    if 0 <= route < len(window):
        s,e,c,editable = window[route]
        if editable: routed = [s,e]
    return [contents,ranges,routed,offset>0,offset+len(window)<len(cells)]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('contract fixture 1', solve([[[0,N,'ab',True],[N,N+2,'SECRET',False],[N+2,N+2,'',True]],1,2,1],), [['•',' '],[[N,N+2],[N+2,N+2]],[N+2,N+2],True,False])
check('contract fixture 2', solve([[[0,2,'ab',True],[2,3,'c',True],[3,4,'d',True]],0,2,0],), [['ab','c'],[[0,2],[2,3]],[0,2],False,True])
check('contract fixture 3', solve([[[0,1,'x',False]],0,1,0],), [['x'],[[0,1]],None,False,False])
check('contract fixture 4', solve([[[0,1,'x',True]],0,1,-1],), [['x'],[[0,1]],None,False,False])
check('contract fixture 5', solve([[[0,1,'x',True]],0,1,1],), [['x'],[[0,1]],None,False,False])
check('contract fixture 6', solve([[[0,1,'x',True]],-2,0,0],), [[],[],None,False,True])
check('contract fixture 7', solve([[[0,1,'a',True],[1,2,'b',True]],-1,1,0],), [['a'],[[0,1]],[0,1],False,True])
check('contract fixture 8', solve([[],0,4,0],), [[],[],None,False,False])
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
contract fixture 1[['•', ' '], [[1, 3], [3, 3]], [3, 3], True, False][['•', ' '], [[1, 3], [3, 3]], [3, 3], True, False]Passed
contract fixture 2[['ab', 'c'], [[0, 2], [2, 3]], [0, 2], False, True][['ab', 'c'], [[0, 2], [2, 3]], [0, 2], False, True]Passed
contract fixture 3[['x'], [[0, 1]], None, False, False][['x'], [[0, 1]], None, False, False]Passed
contract fixture 4[['x'], [[0, 1]], None, False, False][['x'], [[0, 1]], None, False, False]Passed
contract fixture 5[['x'], [[0, 1]], None, False, False][['x'], [[0, 1]], None, False, False]Passed
contract fixture 6[[], [], None, False, True][[], [], None, False, True]Passed
contract fixture 7[['a'], [[0, 1]], [0, 1], False, True][['a'], [[0, 1]], [0, 1], False, True]Passed
contract fixture 8[[], [], None, False, False][[], [], None, False, False]Passed

SHA-256 / 9366225523c4f8d0d94e6737016ceee05746c3c7b4829d345dbeaa6ea661fe4d

Verification & scope

Stipulated finite adapter contract, not a claim of platform accessibility or ARIA conformance. 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:45:46.438538+00:00.

Case digest / d9d53188fe80d8fee92bfc6486c8aa0ee79a4ecaac809c5783ea74238bc5d3c4