FAILURE MAP
← Case archive

FA-8436 / Assistive semantics / Open access

Accessible name precedence: An explicit empty aria-label falls back to unrelated text · case 01

An explicit empty aria-label falls back to unrelated text.

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

ROOT CAUSE

The aria empty operation uses `if aria_label:` where the contract requires `if aria_label is not None:`.

VERIFIED REPAIR

Implement the aria empty operation as `if aria_label is not None:`.

Unsuccessful approach: Checking only absence discards supplied aria-labels.

Case contract

Resolve existing labelledby references in order, including explicit empty labels; then aria-label, native label, and visible content; explicit labels take precedence over fallback content.

Why this case matters

A deterministic model of accessible name precedence; this isolates one interface invariant without requiring a browser.

1 / The failure

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

N = 1
observations = []
def solve(labelledby, nodes, aria_label, native_label, content, hidden):
    referenced = [nodes[x] for x in labelledby if x in nodes]
    if referenced: return ' '.join(referenced)
    if aria_label: return aria_label
    if native_label is not None: return native_label
    if hidden: return ''
    return content
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('reference order', solve(['z','a'], {'z':'Zulu','a':'Alpha'}, 'fallback', 'native', 'body', False), 'Zulu Alpha')
check('aria empty', solve([], {}, '', 'native', 'body', False), '')
check('native empty', solve([], {}, None, '', 'body', False), '')
check('hidden', solve([], {}, None, None, 'secret', True), '')
check('visible', solve([], {}, None, None, 'visible', False), 'visible')
check('empty reference', solve(['missing','empty'], {'empty':''}, 'fallback', None, 'body', False), '')
check('parameterized label content', solve([], {}, 'label'+str(N), None, 'body', False), 'label'+str(N))
for repetition in range(N):
    check('repeat empty reference', solve(['missing','empty'], {'empty':''}, 'fallback', None, 'body', False), '')
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
reference orderZulu AlphaZulu AlphaPassed
aria emptynativeFailed
native emptyPassed
hiddenPassed
visiblevisiblevisiblePassed
empty referencePassed
parameterized label contentlabel1label1Passed
repeat empty referencePassed

SHA-256 / e953b0693538d6e1d1261a2a6f306585b819aeec1e0fdf26900962875e1b1a93

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(labelledby, nodes, aria_label, native_label, content, hidden):
    referenced = [nodes[x] for x in labelledby if x in nodes]
    if referenced: return ' '.join(referenced)
    if aria_label is None: return aria_label
    if native_label is not None: return native_label
    if hidden: return ''
    return content
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('reference order', solve(['z','a'], {'z':'Zulu','a':'Alpha'}, 'fallback', 'native', 'body', False), 'Zulu Alpha')
check('aria empty', solve([], {}, '', 'native', 'body', False), '')
check('native empty', solve([], {}, None, '', 'body', False), '')
check('hidden', solve([], {}, None, None, 'secret', True), '')
check('visible', solve([], {}, None, None, 'visible', False), 'visible')
check('empty reference', solve(['missing','empty'], {'empty':''}, 'fallback', None, 'body', False), '')
check('parameterized label content', solve([], {}, 'label'+str(N), None, 'body', False), 'label'+str(N))
for repetition in range(N):
    check('repeat empty reference', solve(['missing','empty'], {'empty':''}, 'fallback', None, 'body', False), '')
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
reference orderZulu AlphaZulu AlphaPassed
aria emptynativeFailed
native emptyNoneFailed
hiddenNoneFailed
visibleNonevisibleFailed
empty referencePassed
parameterized label contentbodylabel1Failed
repeat empty referencePassed

SHA-256 / d6f4ce047933d8700c17435f4b187c8f42e308c8913b3094e113d3fb7503f5e4

3 / The verified repair

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

N = 1
observations = []
def solve(labelledby, nodes, aria_label, native_label, content, hidden):
    referenced = [nodes[x] for x in labelledby if x in nodes]
    if referenced: return ' '.join(referenced)
    if aria_label is not None: return aria_label
    if native_label is not None: return native_label
    if hidden: return ''
    return content
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('reference order', solve(['z','a'], {'z':'Zulu','a':'Alpha'}, 'fallback', 'native', 'body', False), 'Zulu Alpha')
check('aria empty', solve([], {}, '', 'native', 'body', False), '')
check('native empty', solve([], {}, None, '', 'body', False), '')
check('hidden', solve([], {}, None, None, 'secret', True), '')
check('visible', solve([], {}, None, None, 'visible', False), 'visible')
check('empty reference', solve(['missing','empty'], {'empty':''}, 'fallback', None, 'body', False), '')
check('parameterized label content', solve([], {}, 'label'+str(N), None, 'body', False), 'label'+str(N))
for repetition in range(N):
    check('repeat empty reference', solve(['missing','empty'], {'empty':''}, 'fallback', None, 'body', False), '')
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
reference orderZulu AlphaZulu AlphaPassed
aria emptyPassed
native emptyPassed
hiddenPassed
visiblevisiblevisiblePassed
empty referencePassed
parameterized label contentlabel1label1Passed
repeat empty referencePassed

SHA-256 / 4a8117238ad2ac80817d300f0e91664c1ddb47df852ab045ba134c325fc2746f

Verification & scope

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

Case digest / 5abccca37931532d544cead80ca57e081c08bffc70b42c0b213d9cf196272d2f