FAILURE MAP
← Case archive

FA-54601 / Accessibility interaction semantics / Open access

An explicitly empty math alternative erases structure · case 01

An explicitly empty math alternative erases structure.

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

ROOT CAUSE

The empty alternative decision in the math semantics adapter violates its declared contract.

THE FAILURE

The empty alternative decision in the math semantics adapter violates its declared contract.

Unsuccessful approach: The local repair substitutes node.get('alternative') if 'alternative' in node else (render(children[0]) if len(children)==1 else 'malformed') but still mishandles the regression fixtures.

Case contract

Input AST limited to token(value), row(children), fraction(two children), power(two children), root(one child), fenced(children), annotation(primary,alternative) encoded dict kind, value, children, alternative. Empty rows expose empty string. Tokens preserve value. Fraction says fraction numerator over denominator end fraction; power says base to power exponent; root says square root child end root; fenced says open contents close. Empty child output omitted between single spaces. Annotation uses a nonempty alternative verbatim, otherwise its sole primary child. Unknown kinds return unsupported; wrong arity returns malformed without traversing children.

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):
    def render(node):
        kind = node['kind']
        children = node.get('children',[])
        if kind == 'token': return node.get('value','')
        if kind == 'annotation': return node.get('alternative','')
        if kind in ('fraction','power') and len(children)!=2: return 'malformed'
        if kind == 'root' and len(children)!=1: return 'malformed'
        if kind not in ('row','fraction','power','root','fenced'): return 'unsupported'
        parts = [render(child) for child in children]
        if kind == 'row': out = parts
        elif kind == 'fraction': out = ['fraction',parts[0],'over',parts[1],'end fraction']
        elif kind == 'power': out = [parts[0],'to power',parts[1]]
        elif kind == 'root': out = ['square root',parts[0],'end root']
        else: out = ['open']+parts+['close']
        return ' '.join(part for part in out if part)
    return render(data)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('contract fixture 1', solve({'kind':'fraction','children':[{'kind':'token','value':str(N)},{'kind':'token','value':'x'}]},), 'fraction '+str(N)+' over x end fraction')
check('contract fixture 2', solve({'kind':'power','children':[{'kind':'token','value':'x'},{'kind':'token','value':str(N)}]},), 'x to power '+str(N))
check('contract fixture 3', solve({'kind':'root','children':[{'kind':'token','value':'x'}]},), 'square root x end root')
check('contract fixture 4', solve({'kind':'fenced','children':[{'kind':'row','children':[{'kind':'token','value':''},{'kind':'token','value':'x'}]}]},), 'open x close')
check('contract fixture 5', solve({'kind':'annotation','alternative':'custom','children':[{'kind':'token','value':'x'}]},), 'custom')
check('contract fixture 6', solve({'kind':'annotation','alternative':'','children':[{'kind':'token','value':'x'}]},), 'x')
check('contract fixture 7', solve({'kind':'fraction','children':[]},), 'malformed')
check('contract fixture 8', solve({'kind':'root','children':[]},), 'malformed')
check('contract fixture 9', solve({'kind':'unknown','children':[]},), 'unsupported')
check('contract fixture 10', solve({'kind':'row','children':[]},), '')
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 1fraction 1 over x end fractionfraction 1 over x end fractionPassed
contract fixture 2x to power 1x to power 1Passed
contract fixture 3square root x end rootsquare root x end rootPassed
contract fixture 4open x closeopen x closePassed
contract fixture 5customcustomPassed
contract fixture 6xFailed
contract fixture 7malformedmalformedPassed
contract fixture 8malformedmalformedPassed
contract fixture 9unsupportedunsupportedPassed
contract fixture 10Passed

SHA-256 / 115ae2a72ce05a1d9d35fec71b69564da121fa12eb530d927b82ef04132ddc26

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(data):
    def render(node):
        kind = node['kind']
        children = node.get('children',[])
        if kind == 'token': return node.get('value','')
        if kind == 'annotation': return node.get('alternative') if 'alternative' in node else (render(children[0]) if len(children)==1 else 'malformed')
        if kind in ('fraction','power') and len(children)!=2: return 'malformed'
        if kind == 'root' and len(children)!=1: return 'malformed'
        if kind not in ('row','fraction','power','root','fenced'): return 'unsupported'
        parts = [render(child) for child in children]
        if kind == 'row': out = parts
        elif kind == 'fraction': out = ['fraction',parts[0],'over',parts[1],'end fraction']
        elif kind == 'power': out = [parts[0],'to power',parts[1]]
        elif kind == 'root': out = ['square root',parts[0],'end root']
        else: out = ['open']+parts+['close']
        return ' '.join(part for part in out if part)
    return render(data)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('contract fixture 1', solve({'kind':'fraction','children':[{'kind':'token','value':str(N)},{'kind':'token','value':'x'}]},), 'fraction '+str(N)+' over x end fraction')
check('contract fixture 2', solve({'kind':'power','children':[{'kind':'token','value':'x'},{'kind':'token','value':str(N)}]},), 'x to power '+str(N))
check('contract fixture 3', solve({'kind':'root','children':[{'kind':'token','value':'x'}]},), 'square root x end root')
check('contract fixture 4', solve({'kind':'fenced','children':[{'kind':'row','children':[{'kind':'token','value':''},{'kind':'token','value':'x'}]}]},), 'open x close')
check('contract fixture 5', solve({'kind':'annotation','alternative':'custom','children':[{'kind':'token','value':'x'}]},), 'custom')
check('contract fixture 6', solve({'kind':'annotation','alternative':'','children':[{'kind':'token','value':'x'}]},), 'x')
check('contract fixture 7', solve({'kind':'fraction','children':[]},), 'malformed')
check('contract fixture 8', solve({'kind':'root','children':[]},), 'malformed')
check('contract fixture 9', solve({'kind':'unknown','children':[]},), 'unsupported')
check('contract fixture 10', solve({'kind':'row','children':[]},), '')
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 1fraction 1 over x end fractionfraction 1 over x end fractionPassed
contract fixture 2x to power 1x to power 1Passed
contract fixture 3square root x end rootsquare root x end rootPassed
contract fixture 4open x closeopen x closePassed
contract fixture 5customcustomPassed
contract fixture 6xFailed
contract fixture 7malformedmalformedPassed
contract fixture 8malformedmalformedPassed
contract fixture 9unsupportedunsupportedPassed
contract fixture 10Passed

SHA-256 / b6c002dfde5977423a650a19e4752aba3b159ae4f9b6f1548c10b39da71956c8

HELD IN THE MEMBER ARCHIVE

The verified repair and its recorded checks are member-only.

This mechanism has 10 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:50.207235+00:00.

Case digest / 8d2a34db529e07413f477afeece06b07bd020d0778379cbcb5717e78ee08572d