FAILURE MAP
← Case archive

FA-54586 / Accessibility interaction semantics / Open access

Pronunciation ranges are mislabeled as base text · case 01

Pronunciation ranges are mislabeled as base text.

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

ROOT CAUSE

The run origin decision in the ruby projection adapter violates its declared contract.

THE FAILURE

The run origin decision in the ruby projection adapter violates its declared contract.

Unsuccessful approach: The local repair substitutes [start,len(text),language,'annotation'] 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' 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,'base'])
    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', 'base']]]['字(ji)', [[0, 1, 'ja', 'base'], [1, 5, 'ja', 'annotation']]]Failed
contract fixture 2['ji', [[0, 2, 'ja', 'base']]]['ji', [[0, 2, 'ja', 'annotation']]]Failed
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 / d81779868439fee186159f1c5650046a8a9d3406bfe47de0d5d4fe6e3fd6c911

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 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,'annotation'])
    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', 'annotation'], [1, 5, 'ja', 'annotation']]]['字(ji)', [[0, 1, 'ja', 'base'], [1, 5, 'ja', 'annotation']]]Failed
contract fixture 2['ji', [[0, 2, 'ja', 'annotation']]]['ji', [[0, 2, 'ja', 'annotation']]]Passed
contract fixture 3['字', [[0, 1, 'ja', 'annotation']]]['字', [[0, 1, 'ja', 'base']]]Failed
contract fixture 4['same', [[0, 4, '', 'annotation']]]['same', [[0, 4, '', 'base']]]Failed
contract fixture 5['AB', [[0, 1, 'en', 'annotation'], [1, 2, 'en', 'annotation']]]['AB', [[0, 1, 'en', 'base'], [1, 2, 'en', 'base']]]Failed
contract fixture 6['', []]['', []]Passed
contract fixture 7['A', [[0, 1, 'en', 'annotation']]]['A', [[0, 1, 'en', 'base']]]Failed
contract fixture 8['', []]['', []]Passed

SHA-256 / 0710453dddaa1a2cf160307e998867925cd5c005907a8d08638ab5db723c8e0b

HELD IN THE MEMBER ARCHIVE

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

This mechanism has 8 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:49.766267+00:00.

Case digest / 86f75630dafb7b6ef9598a53ef3141c01aef4b3ee27b08e5908fc14862d3f7ae