FAILURE MAP
← Case archive

FA-53376 / Accessibility interaction semantics / Open access

Unsupported native roles are used as a fallback · case 01

Unsupported native roles are used as a fallback.

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

ROOT CAUSE

The unsupported native decision in the role negotiation adapter violates its declared contract.

VERIFIED REPAIR

Apply the exact contract at the unsupported native decision: chosen = native if native in supported else 'generic'

Unsuccessful approach: The local repair substitutes chosen = native if supported else 'presentation' but still mishandles the regression fixtures.

Case contract

Resolve an adapter role from ordered author tokens, native role, interactivity, required-role constraint and platform support. Supported abstract roles are group, link, image, button, article, generic and presentation. Skip unknown and abstract tokens (command, structure). Only first usable explicit token wins. Presentation is ignored on interactive objects; required native role (when required true) rejects incompatible overrides except native itself. Unsupported platform roles fall back to native if supported, otherwise generic. Generic yields no interface; link and button yield action, image yields image, article/group yield container. Return [role,interface,source] where source is explicit, native, or fallback.

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):
    tokens,native,interactive,required,supported = data
    known = {'group','link','image','button','article','generic','presentation'}
    chosen = None
    source = 'native'
    for token in tokens.split():
        if token not in known: continue
        if token == 'presentation' and interactive: continue
        if required and token != native: continue
        chosen = token
        source = 'explicit'
        break
    if chosen is None: chosen = native
    if chosen not in supported:
        chosen = native
        source = 'fallback'
    interface = {'link':'action','button':'action','image':'image','article':'container','group':'container'}.get(chosen)
    return [chosen,interface,source]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('ordered fallback', solve(['unknown command group link','image',False,False,['group','link','image']],), ['group','container','explicit'])
check('interactive presentation', solve(['presentation link','button',True,False,['presentation','link','button']],), ['link','action','explicit'])
check('required role', solve(['link image','image',False,True,['image','link']],), ['image','image','explicit'])
check('native fallback', solve(['article','image',False,False,['image']],), ['image','image','fallback'])
check('no supported native', solve(['group','image',False,False,[]],), ['generic',None,'fallback'])
check('empty uses native', solve([' '*N,'button',True,False,['button']],), ['button','action','native'])
check('unknown only', solve(['unknown'+str(N),['article','image','button','group','link'][N-1],False,False,['article','image','button','group','link']],), [['article','image','button','group','link'][N-1],['container','image','action','container','action'][N-1],'native'])
check('presentation retained', solve(['presentation','image',False,False,['presentation']],), ['presentation',None,'explicit'])
check('tab separated', solve(['unknown\timage','group',False,False,['image','group']],), ['image','image','explicit'])
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
ordered fallback['group', 'container', 'explicit']['group', 'container', 'explicit']Passed
interactive presentation['link', 'action', 'explicit']['link', 'action', 'explicit']Passed
required role['image', 'image', 'explicit']['image', 'image', 'explicit']Passed
native fallback['image', 'image', 'fallback']['image', 'image', 'fallback']Passed
no supported native['image', 'image', 'fallback']['generic', None, 'fallback']Failed
empty uses native['button', 'action', 'native']['button', 'action', 'native']Passed
unknown only['article', 'container', 'native']['article', 'container', 'native']Passed
presentation retained['presentation', None, 'explicit']['presentation', None, 'explicit']Passed
tab separated['image', 'image', 'explicit']['image', 'image', 'explicit']Passed

SHA-256 / dd9fe4d4045d70187726164d8d48fb24906528b5bc38a85adde511d0c2ef497c

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(data):
    tokens,native,interactive,required,supported = data
    known = {'group','link','image','button','article','generic','presentation'}
    chosen = None
    source = 'native'
    for token in tokens.split():
        if token not in known: continue
        if token == 'presentation' and interactive: continue
        if required and token != native: continue
        chosen = token
        source = 'explicit'
        break
    if chosen is None: chosen = native
    if chosen not in supported:
        chosen = native if supported else 'presentation'
        source = 'fallback'
    interface = {'link':'action','button':'action','image':'image','article':'container','group':'container'}.get(chosen)
    return [chosen,interface,source]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('ordered fallback', solve(['unknown command group link','image',False,False,['group','link','image']],), ['group','container','explicit'])
check('interactive presentation', solve(['presentation link','button',True,False,['presentation','link','button']],), ['link','action','explicit'])
check('required role', solve(['link image','image',False,True,['image','link']],), ['image','image','explicit'])
check('native fallback', solve(['article','image',False,False,['image']],), ['image','image','fallback'])
check('no supported native', solve(['group','image',False,False,[]],), ['generic',None,'fallback'])
check('empty uses native', solve([' '*N,'button',True,False,['button']],), ['button','action','native'])
check('unknown only', solve(['unknown'+str(N),['article','image','button','group','link'][N-1],False,False,['article','image','button','group','link']],), [['article','image','button','group','link'][N-1],['container','image','action','container','action'][N-1],'native'])
check('presentation retained', solve(['presentation','image',False,False,['presentation']],), ['presentation',None,'explicit'])
check('tab separated', solve(['unknown\timage','group',False,False,['image','group']],), ['image','image','explicit'])
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
ordered fallback['group', 'container', 'explicit']['group', 'container', 'explicit']Passed
interactive presentation['link', 'action', 'explicit']['link', 'action', 'explicit']Passed
required role['image', 'image', 'explicit']['image', 'image', 'explicit']Passed
native fallback['image', 'image', 'fallback']['image', 'image', 'fallback']Passed
no supported native['presentation', None, 'fallback']['generic', None, 'fallback']Failed
empty uses native['button', 'action', 'native']['button', 'action', 'native']Passed
unknown only['article', 'container', 'native']['article', 'container', 'native']Passed
presentation retained['presentation', None, 'explicit']['presentation', None, 'explicit']Passed
tab separated['image', 'image', 'explicit']['image', 'image', 'explicit']Passed

SHA-256 / 411f946524f9f195cb0f38531bf035da4516b8469797f08a3b19a51ed0f84632

3 / The verified repair

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

N = 1
observations = []
def solve(data):
    tokens,native,interactive,required,supported = data
    known = {'group','link','image','button','article','generic','presentation'}
    chosen = None
    source = 'native'
    for token in tokens.split():
        if token not in known: continue
        if token == 'presentation' and interactive: continue
        if required and token != native: continue
        chosen = token
        source = 'explicit'
        break
    if chosen is None: chosen = native
    if chosen not in supported:
        chosen = native if native in supported else 'generic'
        source = 'fallback'
    interface = {'link':'action','button':'action','image':'image','article':'container','group':'container'}.get(chosen)
    return [chosen,interface,source]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('ordered fallback', solve(['unknown command group link','image',False,False,['group','link','image']],), ['group','container','explicit'])
check('interactive presentation', solve(['presentation link','button',True,False,['presentation','link','button']],), ['link','action','explicit'])
check('required role', solve(['link image','image',False,True,['image','link']],), ['image','image','explicit'])
check('native fallback', solve(['article','image',False,False,['image']],), ['image','image','fallback'])
check('no supported native', solve(['group','image',False,False,[]],), ['generic',None,'fallback'])
check('empty uses native', solve([' '*N,'button',True,False,['button']],), ['button','action','native'])
check('unknown only', solve(['unknown'+str(N),['article','image','button','group','link'][N-1],False,False,['article','image','button','group','link']],), [['article','image','button','group','link'][N-1],['container','image','action','container','action'][N-1],'native'])
check('presentation retained', solve(['presentation','image',False,False,['presentation']],), ['presentation',None,'explicit'])
check('tab separated', solve(['unknown\timage','group',False,False,['image','group']],), ['image','image','explicit'])
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
ordered fallback['group', 'container', 'explicit']['group', 'container', 'explicit']Passed
interactive presentation['link', 'action', 'explicit']['link', 'action', 'explicit']Passed
required role['image', 'image', 'explicit']['image', 'image', 'explicit']Passed
native fallback['image', 'image', 'fallback']['image', 'image', 'fallback']Passed
no supported native['generic', None, 'fallback']['generic', None, 'fallback']Passed
empty uses native['button', 'action', 'native']['button', 'action', 'native']Passed
unknown only['article', 'container', 'native']['article', 'container', 'native']Passed
presentation retained['presentation', None, 'explicit']['presentation', None, 'explicit']Passed
tab separated['image', 'image', 'explicit']['image', 'image', 'explicit']Passed

SHA-256 / 62dbfd865dd63edc6672be20e6f9f324928668fb6ad07de4b88d9517f3febb01

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

Case digest / 25bb3a053766fb5ef70597673bfebdc8b5f2f403a712a7a692d84461ea6b8f4c