FA-53621 / Accessibility interaction semantics / Open access
Unexposed headings enter document navigation metadata · case 01
Unexposed headings enter document navigation metadata.
ROOT CAUSE
The inventory exposure decision in the heading inventory adapter violates its declared contract.
THE FAILURE
The inventory exposure decision in the heading inventory adapter violates its declared contract.
Unsuccessful approach: The local repair substitutes not visible and doc != document but still mishandles the regression fixtures.
Case contract
A document heading inventory receives records [id,level,text,exposed,document,order] and requested document. Admit exposed level integers 1..6 (booleans are not levels), nonempty text after ASCII trimming, exact document. For duplicate IDs retain the earliest order record; ties retain first input. Output sorted by order with each heading's nearest preceding lower-level heading ID as parent. Skipped levels do not create synthetic headings. Output [id,level,trimmed_text,parent].
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):
records,document = data
chosen = {}
for ident,level,text,visible,doc,order in records:
if doc != document: continue
if type(level) is not int or not 1 <= level <= 6: continue
text = text.strip(' \t\r\n')
if not text: continue
if ident not in chosen or order < chosen[ident][0]: chosen[ident] = (order,level,text)
stack = []
result = []
for ident,(order,level,text) in sorted(chosen.items(),key=lambda pair:pair[1][0]):
while stack and stack[-1][1] >= level: stack.pop()
result.append([ident,level,text,stack[-1][0] if stack else None])
stack.append((ident,level))
return result
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('levels and sibling ancestry', solve([[['a',1,' '+'A'*N+' ',True,'d',0],['b',3,'B',True,'d',N],['c',3,'C',True,'d',N+1],['d',2,'D',True,'d',N+2],['e',1,'E',True,'d',N+3]],'d'],), [['a',1,'A'*N,None],['b',3,'B','a'],['c',3,'C','a'],['d',2,'D','a'],['e',1,'E',None]])
check('sort document order', solve([[['b',2,'B',True,'d',N+1],['a',1,'A',True,'d',N]],'d'],), [['a',1,'A',None],['b',2,'B','a']])
check('earliest duplicate', solve([[['a',2,'late',True,'d',N+1],['a',1,'first',True,'d',N],['a',3,'tie',True,'d',N]],'d'],), [['a',1,'first',None]])
check('visibility and document', solve([[['a',1,'A',False,'d',0],['b',1,'B',True,'e',1],['c',2,'C',True,'d',2]],'d'],), [['c',2,'C',None]])
check('level admission', solve([[['a',0,'A',True,'d',0],['b',7,'B',True,'d',1],['c',True,'C',True,'d',2],['z',6,'Z',True,'d',3]],'d'],), [['z',6,'Z',None]])
check('trim empty and NBSP', solve([[['a',1,' \t',True,'d',0],['b',2,'\u00a0',True,'d',1]],'d'],), [['b',2,'\u00a0',None]])
check('empty', 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 |
|---|---|---|---|
| levels and sibling ancestry | [['a', 1, 'A', None], ['b', 3, 'B', 'a'], ['c', 3, 'C', 'a'], ['d', 2, 'D', 'a'], ['e', 1, 'E', None]] | [['a', 1, 'A', None], ['b', 3, 'B', 'a'], ['c', 3, 'C', 'a'], ['d', 2, 'D', 'a'], ['e', 1, 'E', None]] | Passed |
| sort document order | [['a', 1, 'A', None], ['b', 2, 'B', 'a']] | [['a', 1, 'A', None], ['b', 2, 'B', 'a']] | Passed |
| earliest duplicate | [['a', 1, 'first', None]] | [['a', 1, 'first', None]] | Passed |
| visibility and document | [['a', 1, 'A', None], ['c', 2, 'C', 'a']] | [['c', 2, 'C', None]] | Failed |
| level admission | [['z', 6, 'Z', None]] | [['z', 6, 'Z', None]] | Passed |
| trim empty and NBSP | [['b', 2, '\xa0', None]] | [['b', 2, '\xa0', None]] | Passed |
| empty | [] | [] | Passed |
SHA-256 / 5f53a1e83959c5716976d4a436828c956c955f62caa55ac392e1f504b6151c9b
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(data):
records,document = data
chosen = {}
for ident,level,text,visible,doc,order in records:
if not visible and doc != document: continue
if type(level) is not int or not 1 <= level <= 6: continue
text = text.strip(' \t\r\n')
if not text: continue
if ident not in chosen or order < chosen[ident][0]: chosen[ident] = (order,level,text)
stack = []
result = []
for ident,(order,level,text) in sorted(chosen.items(),key=lambda pair:pair[1][0]):
while stack and stack[-1][1] >= level: stack.pop()
result.append([ident,level,text,stack[-1][0] if stack else None])
stack.append((ident,level))
return result
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('levels and sibling ancestry', solve([[['a',1,' '+'A'*N+' ',True,'d',0],['b',3,'B',True,'d',N],['c',3,'C',True,'d',N+1],['d',2,'D',True,'d',N+2],['e',1,'E',True,'d',N+3]],'d'],), [['a',1,'A'*N,None],['b',3,'B','a'],['c',3,'C','a'],['d',2,'D','a'],['e',1,'E',None]])
check('sort document order', solve([[['b',2,'B',True,'d',N+1],['a',1,'A',True,'d',N]],'d'],), [['a',1,'A',None],['b',2,'B','a']])
check('earliest duplicate', solve([[['a',2,'late',True,'d',N+1],['a',1,'first',True,'d',N],['a',3,'tie',True,'d',N]],'d'],), [['a',1,'first',None]])
check('visibility and document', solve([[['a',1,'A',False,'d',0],['b',1,'B',True,'e',1],['c',2,'C',True,'d',2]],'d'],), [['c',2,'C',None]])
check('level admission', solve([[['a',0,'A',True,'d',0],['b',7,'B',True,'d',1],['c',True,'C',True,'d',2],['z',6,'Z',True,'d',3]],'d'],), [['z',6,'Z',None]])
check('trim empty and NBSP', solve([[['a',1,' \t',True,'d',0],['b',2,'\u00a0',True,'d',1]],'d'],), [['b',2,'\u00a0',None]])
check('empty', 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 |
|---|---|---|---|
| levels and sibling ancestry | [['a', 1, 'A', None], ['b', 3, 'B', 'a'], ['c', 3, 'C', 'a'], ['d', 2, 'D', 'a'], ['e', 1, 'E', None]] | [['a', 1, 'A', None], ['b', 3, 'B', 'a'], ['c', 3, 'C', 'a'], ['d', 2, 'D', 'a'], ['e', 1, 'E', None]] | Passed |
| sort document order | [['a', 1, 'A', None], ['b', 2, 'B', 'a']] | [['a', 1, 'A', None], ['b', 2, 'B', 'a']] | Passed |
| earliest duplicate | [['a', 1, 'first', None]] | [['a', 1, 'first', None]] | Passed |
| visibility and document | [['a', 1, 'A', None], ['b', 1, 'B', None], ['c', 2, 'C', 'b']] | [['c', 2, 'C', None]] | Failed |
| level admission | [['z', 6, 'Z', None]] | [['z', 6, 'Z', None]] | Passed |
| trim empty and NBSP | [['b', 2, '\xa0', None]] | [['b', 2, '\xa0', None]] | Passed |
| empty | [] | [] | Passed |
SHA-256 / 5cab6c499686616b12e30ee3e853febf5497cd9a08d5b11e49ce2163f783a8a8
HELD IN THE MEMBER ARCHIVE
The verified repair and its recorded checks are member-only.
This mechanism has 7 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:41.066388+00:00.
Case digest / 7896f6d8b579d06e23f7a867ce418a0584c167c3c6463ce321762a71299a8486