FA-54366 / Accessibility interaction semantics / Open access
Wrapping labels override an explicit target pointing elsewhere · case 01
Wrapping labels override an explicit target pointing elsewhere.
ROOT CAUSE
The explicit over wrap decision in the label association adapter violates its declared contract.
VERIFIED REPAIR
Apply the exact contract at the explicit over wrap decision: target == ident if target is not None else lid == wrapper
Unsuccessful approach: The local repair substitutes target == ident or (lid == wrapper and bool(target)) 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 or lid == wrapper
if not match or lid in seen: continue
seen.add(lid)
selected.append(text)
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', ['Wrong']]] | [['c', []]] | Failed |
| contract fixture 3 | [['c', []]] | [['c', []]] | Passed |
| contract fixture 4 | [['c', ['Same', 'Same']]] | [['c', ['Same', 'Same']]] | Passed |
| contract fixture 5 | [['c', [' A ']]] | [['c', [' A ']]] | Passed |
| contract fixture 6 | [['c', []]] | [['c', []]] | Passed |
| contract fixture 7 | [['c', ['wrong']]] | [['c', []]] | Failed |
| contract fixture 8 | [['c', ['first', 'second']]] | [['c', ['first', 'second']]] | Passed |
| contract fixture 9 | [] | [] | Passed |
SHA-256 / e4bbe9b3a246d89e538b176ff5c71f3f39b90ca28254d70a5bfd9a2fb63eeb26
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 or (lid == wrapper and bool(target))
if not match or lid in seen: continue
seen.add(lid)
selected.append(text)
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']]] | [['c', ['First1', 'Second', 'Wrapped']]] | Failed |
| contract fixture 2 | [['c', ['Wrong']]] | [['c', []]] | Failed |
| contract fixture 3 | [['c', []]] | [['c', []]] | Passed |
| contract fixture 4 | [['c', ['Same', 'Same']]] | [['c', ['Same', 'Same']]] | Passed |
| contract fixture 5 | [['c', [' A ']]] | [['c', [' A ']]] | Passed |
| 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 / ff7df3c355ed7cb02a88e8c0bd5401c26a9b30c58037fee516f14402c53da8bf
3 / The verified repair
Exit 0"""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)
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 ']]] | Passed |
| 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 / 46bb14925fab587f95313cdbd6c276258105a97ea10b11ce59240ffc74e649ed
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.765162+00:00.
Case digest / 94829b64102851a51e43cd6c64099a47cb84f1b6b8a867c0a12df34670cc1a07