FA-54386 / Accessibility interaction semantics / Open access
Association strips intentional label whitespace · case 01
Association strips intentional label whitespace.
ROOT CAUSE
The label whitespace decision in the label association adapter violates its declared contract.
THE FAILURE
The label whitespace decision in the label association adapter violates its declared contract.
Unsuccessful approach: The local repair substitutes selected.append(text.lstrip()) but still mishandles the regression fixtures.
Case contract
Input [controls,labels,document] controls [id,doc,labelable,wrapping_label], labels [id,doc,for_id,text,order]. Labels with for_id None apply only through wrapping_label; explicit empty for_id never wraps. For each labelable control in document, combine matching labels sorted order, ignoring other documents; repeated text retained but each label ID occurs at most once. Explicit for_id matches exact control ID and overrides wrapping. Preserve text verbatim except skip empty text. Return [control_id,label_texts]. Every control ID is unique within document, labels may repeat IDs; first eligible duplicate wins.
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):
controls,labels,document = data
result = []
for ident,doc,labelable,wrapper in controls:
if doc != document or not labelable: continue
selected = []
seen = set()
for lid,ldoc,target,text,order in sorted(labels,key=lambda row:row[4]):
if ldoc != document or not text: continue
match = target == ident if target is not None else lid == wrapper
if not match or lid in seen: continue
seen.add(lid)
selected.append(text.strip())
result.append([ident,selected])
return result
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('contract fixture 1', solve([[['c','d',True,'wrap']],[['later','d','c','Second',N+1],['first','d','c','First'+str(N),N],['wrap','d',None,'Wrapped',N+2]],'d'],), [['c',['First'+str(N),'Second','Wrapped']]])
check('contract fixture 2', solve([[['c','d',True,'wrap']],[['wrap','d','other','Wrong',0],['empty','d','','Wrong',1]],'d'],), [['c',[]]])
check('contract fixture 3', solve([[['c','d',True,'wrap'],['foreign','e',True,None],['not','d',False,None]],[['wrap','e',None,'Other doc',0]],'d'],), [['c',[]]])
check('contract fixture 4', solve([[['c','d',True,None]],[['a','d','c','Same',0],['b','d','c','Same',1],['a','d','c','Duplicate ID',2]],'d'],), [['c',['Same','Same']]])
check('contract fixture 5', solve([[['c','d',True,None]],[['a','d','c','',0],['b','d','c',' A ',1]],'d'],), [['c',[' A ']]])
check('contract fixture 6', solve([[['c','d',True,None]],[],'d'],), [['c',[]]])
check('contract fixture 7', solve([[['c','d',True,'wrap']],[['wrap','d','','wrong',0]],'d'],), [['c',[]]])
check('contract fixture 8', solve([[['c','d',True,None]],[['z','d','c','first',0],['a','d','c','second',1]],'d'],), [['c',['first','second']]])
check('contract fixture 9', solve([[],[],'d'],), [])
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 | [['c', ['First1', 'Second', 'Wrapped']]] | [['c', ['First1', 'Second', 'Wrapped']]] | Passed |
| contract fixture 2 | [['c', []]] | [['c', []]] | Passed |
| contract fixture 3 | [['c', []]] | [['c', []]] | Passed |
| contract fixture 4 | [['c', ['Same', 'Same']]] | [['c', ['Same', 'Same']]] | Passed |
| contract fixture 5 | [['c', ['A']]] | [['c', [' A ']]] | Failed |
| contract fixture 6 | [['c', []]] | [['c', []]] | Passed |
| contract fixture 7 | [['c', []]] | [['c', []]] | Passed |
| contract fixture 8 | [['c', ['first', 'second']]] | [['c', ['first', 'second']]] | Passed |
| contract fixture 9 | [] | [] | Passed |
SHA-256 / 56ada7ef42263cb11f7fbd13afe219412950cf9822a43b1f4450f2f4eead1fa3
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(data):
controls,labels,document = data
result = []
for ident,doc,labelable,wrapper in controls:
if doc != document or not labelable: continue
selected = []
seen = set()
for lid,ldoc,target,text,order in sorted(labels,key=lambda row:row[4]):
if ldoc != document or not text: continue
match = target == ident if target is not None else lid == wrapper
if not match or lid in seen: continue
seen.add(lid)
selected.append(text.lstrip())
result.append([ident,selected])
return result
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('contract fixture 1', solve([[['c','d',True,'wrap']],[['later','d','c','Second',N+1],['first','d','c','First'+str(N),N],['wrap','d',None,'Wrapped',N+2]],'d'],), [['c',['First'+str(N),'Second','Wrapped']]])
check('contract fixture 2', solve([[['c','d',True,'wrap']],[['wrap','d','other','Wrong',0],['empty','d','','Wrong',1]],'d'],), [['c',[]]])
check('contract fixture 3', solve([[['c','d',True,'wrap'],['foreign','e',True,None],['not','d',False,None]],[['wrap','e',None,'Other doc',0]],'d'],), [['c',[]]])
check('contract fixture 4', solve([[['c','d',True,None]],[['a','d','c','Same',0],['b','d','c','Same',1],['a','d','c','Duplicate ID',2]],'d'],), [['c',['Same','Same']]])
check('contract fixture 5', solve([[['c','d',True,None]],[['a','d','c','',0],['b','d','c',' A ',1]],'d'],), [['c',[' A ']]])
check('contract fixture 6', solve([[['c','d',True,None]],[],'d'],), [['c',[]]])
check('contract fixture 7', solve([[['c','d',True,'wrap']],[['wrap','d','','wrong',0]],'d'],), [['c',[]]])
check('contract fixture 8', solve([[['c','d',True,None]],[['z','d','c','first',0],['a','d','c','second',1]],'d'],), [['c',['first','second']]])
check('contract fixture 9', solve([[],[],'d'],), [])
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 | [['c', ['First1', 'Second', 'Wrapped']]] | [['c', ['First1', 'Second', 'Wrapped']]] | Passed |
| contract fixture 2 | [['c', []]] | [['c', []]] | Passed |
| contract fixture 3 | [['c', []]] | [['c', []]] | Passed |
| contract fixture 4 | [['c', ['Same', 'Same']]] | [['c', ['Same', 'Same']]] | Passed |
| contract fixture 5 | [['c', ['A ']]] | [['c', [' A ']]] | Failed |
| contract fixture 6 | [['c', []]] | [['c', []]] | Passed |
| contract fixture 7 | [['c', []]] | [['c', []]] | Passed |
| contract fixture 8 | [['c', ['first', 'second']]] | [['c', ['first', 'second']]] | Passed |
| contract fixture 9 | [] | [] | Passed |
SHA-256 / 06946977d1948177041b5fce3e1894be0045b1237b7d2e95860b801a2459909d
HELD IN THE MEMBER ARCHIVE
The verified repair and its recorded checks are member-only.
This mechanism has 9 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:47.890726+00:00.
Case digest / 96b534143432a16e76fecbd9081139a5256ca275a263f64e96c5b5be3806093b