FAILURE MAP
← Case archive

FA-54551 / Accessibility interaction semantics / Open access

An absent pronunciation erases the base text · case 01

An absent pronunciation erases the base text.

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

ROOT CAUSE

The annotation fallback decision in the ruby projection adapter violates its declared contract.

VERIFIED REPAIR

Apply the exact contract at the annotation fallback decision: mode == 'annotation' and annotation

Unsuccessful approach: The local repair substitutes mode == 'annotation' and not hidden but still mishandles the regression fixtures.

Case contract

Input [segments,mode] where segments [base,annotation,fallback,language,hidden_annotation]. mode is base,annotation,combined. In annotation mode use nonempty visible annotation, otherwise base. Combined adds parenthesized visible annotation only when nonempty and different from base; fallback is markup-only content and never exposed. Return [text,runs] with runs [start,end,language,source], omitting zero-length contributions. Each segment is concatenated without implicit spaces. Combined annotation run includes parentheses. Source is base or annotation. Preserve original strings and language, including empty language.

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):
    segments,mode = data
    text = ''
    runs = []
    for base,annotation,fallback,language,hidden in segments:
        annotation = '' if hidden else annotation
        parts = []
        if mode == 'annotation': parts = [(annotation,'annotation')]
        else:
            parts = [(base,'base')]
            if mode == 'combined' and annotation and annotation != base: parts.append(('('+annotation+')','annotation'))
        for value,source in parts:
            if not value: continue
            start = len(text)
            text += value
            runs.append([start,len(text),language,source])
    return [text,runs]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('contract fixture 1', solve([[['字'*N,'ji','fallback','ja',False]],'combined'],), ['字'*N+'(ji)',[[0,N,'ja','base'],[N,N+4,'ja','annotation']]])
check('contract fixture 2', solve([[['字','ji','fallback','ja',False]],'annotation'],), ['ji',[[0,2,'ja','annotation']]])
check('contract fixture 3', solve([[['字','ji','fallback','ja',True]],'annotation'],), ['字',[[0,1,'ja','base']]])
check('contract fixture 4', solve([[['same','same','fallback','',False]],'combined'],), ['same',[[0,4,'','base']]])
check('contract fixture 5', solve([[['A','','fallback','en',False],['B','bee','fallback','en',False]],'base'],), ['AB',[[0,1,'en','base'],[1,2,'en','base']]])
check('contract fixture 6', solve([[['','','fallback','en',False]],'combined'],), ['',[]])
check('contract fixture 7', solve([[['A','','fallback','en',False]],'annotation'],), ['A',[[0,1,'en','base']]])
check('contract fixture 8', solve([[],'annotation'],), ['',[]])
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 1['字(ji)', [[0, 1, 'ja', 'base'], [1, 5, 'ja', 'annotation']]]['字(ji)', [[0, 1, 'ja', 'base'], [1, 5, 'ja', 'annotation']]]Passed
contract fixture 2['ji', [[0, 2, 'ja', 'annotation']]]['ji', [[0, 2, 'ja', 'annotation']]]Passed
contract fixture 3['', []]['字', [[0, 1, 'ja', 'base']]]Failed
contract fixture 4['same', [[0, 4, '', 'base']]]['same', [[0, 4, '', 'base']]]Passed
contract fixture 5['AB', [[0, 1, 'en', 'base'], [1, 2, 'en', 'base']]]['AB', [[0, 1, 'en', 'base'], [1, 2, 'en', 'base']]]Passed
contract fixture 6['', []]['', []]Passed
contract fixture 7['', []]['A', [[0, 1, 'en', 'base']]]Failed
contract fixture 8['', []]['', []]Passed

SHA-256 / 7b76ea8c64e599262bacc9f22f9b218ae1208a2655382c4c60d3b18b74a3efa7

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(data):
    segments,mode = data
    text = ''
    runs = []
    for base,annotation,fallback,language,hidden in segments:
        annotation = '' if hidden else annotation
        parts = []
        if mode == 'annotation' and not hidden: parts = [(annotation,'annotation')]
        else:
            parts = [(base,'base')]
            if mode == 'combined' and annotation and annotation != base: parts.append(('('+annotation+')','annotation'))
        for value,source in parts:
            if not value: continue
            start = len(text)
            text += value
            runs.append([start,len(text),language,source])
    return [text,runs]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('contract fixture 1', solve([[['字'*N,'ji','fallback','ja',False]],'combined'],), ['字'*N+'(ji)',[[0,N,'ja','base'],[N,N+4,'ja','annotation']]])
check('contract fixture 2', solve([[['字','ji','fallback','ja',False]],'annotation'],), ['ji',[[0,2,'ja','annotation']]])
check('contract fixture 3', solve([[['字','ji','fallback','ja',True]],'annotation'],), ['字',[[0,1,'ja','base']]])
check('contract fixture 4', solve([[['same','same','fallback','',False]],'combined'],), ['same',[[0,4,'','base']]])
check('contract fixture 5', solve([[['A','','fallback','en',False],['B','bee','fallback','en',False]],'base'],), ['AB',[[0,1,'en','base'],[1,2,'en','base']]])
check('contract fixture 6', solve([[['','','fallback','en',False]],'combined'],), ['',[]])
check('contract fixture 7', solve([[['A','','fallback','en',False]],'annotation'],), ['A',[[0,1,'en','base']]])
check('contract fixture 8', solve([[],'annotation'],), ['',[]])
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 1['字(ji)', [[0, 1, 'ja', 'base'], [1, 5, 'ja', 'annotation']]]['字(ji)', [[0, 1, 'ja', 'base'], [1, 5, 'ja', 'annotation']]]Passed
contract fixture 2['ji', [[0, 2, 'ja', 'annotation']]]['ji', [[0, 2, 'ja', 'annotation']]]Passed
contract fixture 3['字', [[0, 1, 'ja', 'base']]]['字', [[0, 1, 'ja', 'base']]]Passed
contract fixture 4['same', [[0, 4, '', 'base']]]['same', [[0, 4, '', 'base']]]Passed
contract fixture 5['AB', [[0, 1, 'en', 'base'], [1, 2, 'en', 'base']]]['AB', [[0, 1, 'en', 'base'], [1, 2, 'en', 'base']]]Passed
contract fixture 6['', []]['', []]Passed
contract fixture 7['', []]['A', [[0, 1, 'en', 'base']]]Failed
contract fixture 8['', []]['', []]Passed

SHA-256 / 8de41ef4a926cc61f753bc091c113d61a8e88058db1f2dcbec3eb1e174d00621

3 / The verified repair

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

N = 1
observations = []
def solve(data):
    segments,mode = data
    text = ''
    runs = []
    for base,annotation,fallback,language,hidden in segments:
        annotation = '' if hidden else annotation
        parts = []
        if mode == 'annotation' and annotation: parts = [(annotation,'annotation')]
        else:
            parts = [(base,'base')]
            if mode == 'combined' and annotation and annotation != base: parts.append(('('+annotation+')','annotation'))
        for value,source in parts:
            if not value: continue
            start = len(text)
            text += value
            runs.append([start,len(text),language,source])
    return [text,runs]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('contract fixture 1', solve([[['字'*N,'ji','fallback','ja',False]],'combined'],), ['字'*N+'(ji)',[[0,N,'ja','base'],[N,N+4,'ja','annotation']]])
check('contract fixture 2', solve([[['字','ji','fallback','ja',False]],'annotation'],), ['ji',[[0,2,'ja','annotation']]])
check('contract fixture 3', solve([[['字','ji','fallback','ja',True]],'annotation'],), ['字',[[0,1,'ja','base']]])
check('contract fixture 4', solve([[['same','same','fallback','',False]],'combined'],), ['same',[[0,4,'','base']]])
check('contract fixture 5', solve([[['A','','fallback','en',False],['B','bee','fallback','en',False]],'base'],), ['AB',[[0,1,'en','base'],[1,2,'en','base']]])
check('contract fixture 6', solve([[['','','fallback','en',False]],'combined'],), ['',[]])
check('contract fixture 7', solve([[['A','','fallback','en',False]],'annotation'],), ['A',[[0,1,'en','base']]])
check('contract fixture 8', solve([[],'annotation'],), ['',[]])
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 1['字(ji)', [[0, 1, 'ja', 'base'], [1, 5, 'ja', 'annotation']]]['字(ji)', [[0, 1, 'ja', 'base'], [1, 5, 'ja', 'annotation']]]Passed
contract fixture 2['ji', [[0, 2, 'ja', 'annotation']]]['ji', [[0, 2, 'ja', 'annotation']]]Passed
contract fixture 3['字', [[0, 1, 'ja', 'base']]]['字', [[0, 1, 'ja', 'base']]]Passed
contract fixture 4['same', [[0, 4, '', 'base']]]['same', [[0, 4, '', 'base']]]Passed
contract fixture 5['AB', [[0, 1, 'en', 'base'], [1, 2, 'en', 'base']]]['AB', [[0, 1, 'en', 'base'], [1, 2, 'en', 'base']]]Passed
contract fixture 6['', []]['', []]Passed
contract fixture 7['A', [[0, 1, 'en', 'base']]]['A', [[0, 1, 'en', 'base']]]Passed
contract fixture 8['', []]['', []]Passed

SHA-256 / eb81ebe6d091c6f59a4ebe679a3d7b873702f24bdc0e46661bd6b7f67a35b703

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:49.392351+00:00.

Case digest / 34922b774e28a30ad9f3c028e5cdfdbff42acbc54bf5b0f06aae8d77bd47089d