FA-54091 / Accessibility interaction semantics / Open access
Zero-capacity accessible editors accept inserted text · case 01
Zero-capacity accessible editors accept inserted text.
ROOT CAUSE
The zero maximum decision in the text edit adapter adapter violates its declared contract.
THE FAILURE
The zero maximum decision in the text edit adapter adapter violates its declared contract.
Unsuccessful approach: The local repair substitutes maximum is not None and maximum > 0 but still mishandles the regression fixtures.
Case contract
Input [text,readonly,maximum,operations] operations [start,end,replacement]. Validate integer codepoint bounds 0<=start<=end<=len(current_text); readonly rejects each edit. Replace half-open range; reject proposed length beyond maximum (None unlimited) atomically. Return [final_text,edit_results] where successful result [True,caret,delta] caret is start+replacement length and delta replacement length minus removed length; rejected [False,None,0]. Empty replacement deletes, empty interval inserts. Subsequent offsets address current text.
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):
text,readonly,maximum,operations = data
results = []
for start,end,replacement in operations:
if readonly or not (0 <= start <= end <= len(text)):
results.append([False,None,0]); continue
proposed = text[:start]+replacement+text[end:]
if bool(maximum) and len(proposed) > maximum:
results.append([False,None,0]); continue
delta = len(replacement)-(end-start)
text = proposed
results.append([True,start+len(replacement),delta])
return [text,results]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('contract fixture 1', solve(['A'*N+'BC',False,None,[[N,N+1,'xy'],[N+2,N+3,'']]],), ['A'*N+'xy',[[True,N+2,1],[True,N+2,-1]]])
check('contract fixture 2', solve(['ab',False,3,[[1,1,'X'],[0,0,'Y']]],), ['aXb',[[True,2,1],[False,None,0]]])
check('contract fixture 3', solve(['ab',True,None,[[0,2,'x']]],), ['ab',[[False,None,0]]])
check('contract fixture 4', solve(['ab',False,None,[[-1,1,'x'],[2,1,'x'],[0,3,'x']]],), ['ab',[[False,None,0],[False,None,0],[False,None,0]]])
check('contract fixture 5', solve(['',False,0,[[0,0,''],[0,0,'x']]],), ['',[[True,0,0],[False,None,0]]])
check('contract fixture 6', solve(['😀x',False,None,[[0,1,'é']]],), ['éx',[[True,1,0]]])
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| contract fixture 1 | ['Axy', [[True, 3, 1], [True, 3, -1]]] | ['Axy', [[True, 3, 1], [True, 3, -1]]] | Passed |
| contract fixture 2 | ['aXb', [[True, 2, 1], [False, None, 0]]] | ['aXb', [[True, 2, 1], [False, None, 0]]] | Passed |
| contract fixture 3 | ['ab', [[False, None, 0]]] | ['ab', [[False, None, 0]]] | Passed |
| contract fixture 4 | ['ab', [[False, None, 0], [False, None, 0], [False, None, 0]]] | ['ab', [[False, None, 0], [False, None, 0], [False, None, 0]]] | Passed |
| contract fixture 5 | ['x', [[True, 0, 0], [True, 1, 1]]] | ['', [[True, 0, 0], [False, None, 0]]] | Failed |
| contract fixture 6 | ['éx', [[True, 1, 0]]] | ['éx', [[True, 1, 0]]] | Passed |
SHA-256 / 08acd0dfcd9703f84059412d57320f59672b6c69dab23c2fb7059624d98ba7bb
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(data):
text,readonly,maximum,operations = data
results = []
for start,end,replacement in operations:
if readonly or not (0 <= start <= end <= len(text)):
results.append([False,None,0]); continue
proposed = text[:start]+replacement+text[end:]
if maximum is not None and maximum > 0 and len(proposed) > maximum:
results.append([False,None,0]); continue
delta = len(replacement)-(end-start)
text = proposed
results.append([True,start+len(replacement),delta])
return [text,results]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('contract fixture 1', solve(['A'*N+'BC',False,None,[[N,N+1,'xy'],[N+2,N+3,'']]],), ['A'*N+'xy',[[True,N+2,1],[True,N+2,-1]]])
check('contract fixture 2', solve(['ab',False,3,[[1,1,'X'],[0,0,'Y']]],), ['aXb',[[True,2,1],[False,None,0]]])
check('contract fixture 3', solve(['ab',True,None,[[0,2,'x']]],), ['ab',[[False,None,0]]])
check('contract fixture 4', solve(['ab',False,None,[[-1,1,'x'],[2,1,'x'],[0,3,'x']]],), ['ab',[[False,None,0],[False,None,0],[False,None,0]]])
check('contract fixture 5', solve(['',False,0,[[0,0,''],[0,0,'x']]],), ['',[[True,0,0],[False,None,0]]])
check('contract fixture 6', solve(['😀x',False,None,[[0,1,'é']]],), ['éx',[[True,1,0]]])
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| contract fixture 1 | ['Axy', [[True, 3, 1], [True, 3, -1]]] | ['Axy', [[True, 3, 1], [True, 3, -1]]] | Passed |
| contract fixture 2 | ['aXb', [[True, 2, 1], [False, None, 0]]] | ['aXb', [[True, 2, 1], [False, None, 0]]] | Passed |
| contract fixture 3 | ['ab', [[False, None, 0]]] | ['ab', [[False, None, 0]]] | Passed |
| contract fixture 4 | ['ab', [[False, None, 0], [False, None, 0], [False, None, 0]]] | ['ab', [[False, None, 0], [False, None, 0], [False, None, 0]]] | Passed |
| contract fixture 5 | ['x', [[True, 0, 0], [True, 1, 1]]] | ['', [[True, 0, 0], [False, None, 0]]] | Failed |
| contract fixture 6 | ['éx', [[True, 1, 0]]] | ['éx', [[True, 1, 0]]] | Passed |
SHA-256 / 65108b6333ea8521327ba09676cc23b8deb55f40ad6e05ec1f2ba8a3eb49182a
HELD IN THE MEMBER ARCHIVE
The verified repair and its recorded checks are member-only.
This mechanism has 6 recorded checks per implementation. The open-access tier publishes the failure and the unsuccessful fix; the repaired source that passes every check, and the observations that prove it, are available to members.
Every case sharing this mechanism uses the same contract and the same repair, so this one record is held back for all of them.
Member access is invitation-based. Sign in with your invited account to inspect the repair.
Sign in to the archive ↗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:45.241985+00:00.
Case digest / fc5529113f15c58f67eade7c50b0a71fdc4eb14ce0a5f81d0061bb1b58aa38b3