{"abstract":"Referenced labels are reordered alphabetically.","category":"Assistive semantics","checks":8,"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.","contract_signature":"labelledby, nodes, aria_label, native_label, content, hidden","evaluation_group":"xi-accessible-name","failed_approach":"Reversing references also violates explicit label order.","family":"xi-accessible-name-reference-order","id":"FA-8431","implementations":{"attempt":{"sha256":"561686d73251015a860d641464024189bc86c752d13c623241d28a08fe6b636e","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(labelledby, nodes, aria_label, native_label, content, hidden):\n    referenced = [nodes[x] for x in labelledby if x in nodes]\n    if referenced: return ' '.join(reversed(referenced))\n    if aria_label is not None: return aria_label\n    if native_label is not None: return native_label\n    if hidden: return ''\n    return content\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('reference order', solve(['z','a'], {'z':'Zulu','a':'Alpha'}, 'fallback', 'native', 'body', False), 'Zulu Alpha')\ncheck('aria empty', solve([], {}, '', 'native', 'body', False), '')\ncheck('native empty', solve([], {}, None, '', 'body', False), '')\ncheck('hidden', solve([], {}, None, None, 'secret', True), '')\ncheck('visible', solve([], {}, None, None, 'visible', False), 'visible')\ncheck('empty reference', solve(['missing','empty'], {'empty':''}, 'fallback', None, 'body', False), '')\ncheck('parameterized label content', solve([], {}, 'label'+str(N), None, 'body', False), 'label'+str(N))\nfor repetition in range(N):\n    check('repeat empty reference', solve(['missing','empty'], {'empty':''}, 'fallback', None, 'body', False), '')\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"},"broken":{"sha256":"132a672f7747a8b2996fa9f0d9aee1c280c9ea500e8989e04481ea1ec583b2e1","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(labelledby, nodes, aria_label, native_label, content, hidden):\n    referenced = [nodes[x] for x in labelledby if x in nodes]\n    if referenced: return ' '.join(sorted(referenced))\n    if aria_label is not None: return aria_label\n    if native_label is not None: return native_label\n    if hidden: return ''\n    return content\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('reference order', solve(['z','a'], {'z':'Zulu','a':'Alpha'}, 'fallback', 'native', 'body', False), 'Zulu Alpha')\ncheck('aria empty', solve([], {}, '', 'native', 'body', False), '')\ncheck('native empty', solve([], {}, None, '', 'body', False), '')\ncheck('hidden', solve([], {}, None, None, 'secret', True), '')\ncheck('visible', solve([], {}, None, None, 'visible', False), 'visible')\ncheck('empty reference', solve(['missing','empty'], {'empty':''}, 'fallback', None, 'body', False), '')\ncheck('parameterized label content', solve([], {}, 'label'+str(N), None, 'body', False), 'label'+str(N))\nfor repetition in range(N):\n    check('repeat empty reference', solve(['missing','empty'], {'empty':''}, 'fallback', None, 'body', False), '')\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"}},"limitations":" 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.","method":"Deterministic executable model with adversarial boundary fixtures.","provenance":{"created_by":"Failure Map","dependencies":"Python standard library","family":"xi-accessible-name-reference-order","generated_at":"2026-09-29T14:38:21.422309+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"A deterministic model of accessible name precedence; this isolates one interface invariant without requiring a browser.","root_cause":"The reference order operation uses `' '.join(sorted(referenced))` where the contract requires `' '.join(referenced)`.","sha256":"66a7bf6ccd85b7f0ecfc11b8af56fad41555fba67d567e8d4a2fb4dc3add3450","title":"Accessible name precedence: Referenced labels are reordered alphabetically · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verified":true,"visibility":"public","verification":{"attempt":{"elapsed_ms":38.053,"exit_code":1,"observations":[{"actual":"Alpha Zulu","check":"reference order","expected":"Zulu Alpha","passed":false},{"actual":"","check":"aria empty","expected":"","passed":true},{"actual":"","check":"native empty","expected":"","passed":true},{"actual":"","check":"hidden","expected":"","passed":true},{"actual":"visible","check":"visible","expected":"visible","passed":true},{"actual":"","check":"empty reference","expected":"","passed":true},{"actual":"label1","check":"parameterized label content","expected":"label1","passed":true},{"actual":"","check":"repeat empty reference","expected":"","passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"reference order\", \"actual\": \"Alpha Zulu\", \"expected\": \"Zulu Alpha\", \"passed\": false}, {\"check\": \"aria empty\", \"actual\": \"\", \"expected\": \"\", \"passed\": true}, {\"check\": \"native empty\", \"actual\": \"\", \"expected\": \"\", \"passed\": true}, {\"check\": \"hidden\", \"actual\": \"\", \"expected\": \"\", \"passed\": true}, {\"check\": \"visible\", \"actual\": \"visible\", \"expected\": \"visible\", \"passed\": true}, {\"check\": \"empty reference\", \"actual\": \"\", \"expected\": \"\", \"passed\": true}, {\"check\": \"parameterized label content\", \"actual\": \"label1\", \"expected\": \"label1\", \"passed\": true}, {\"check\": \"repeat empty reference\", \"actual\": \"\", \"expected\": \"\", \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":35.774,"exit_code":1,"observations":[{"actual":"Alpha Zulu","check":"reference order","expected":"Zulu Alpha","passed":false},{"actual":"","check":"aria empty","expected":"","passed":true},{"actual":"","check":"native empty","expected":"","passed":true},{"actual":"","check":"hidden","expected":"","passed":true},{"actual":"visible","check":"visible","expected":"visible","passed":true},{"actual":"","check":"empty reference","expected":"","passed":true},{"actual":"label1","check":"parameterized label content","expected":"label1","passed":true},{"actual":"","check":"repeat empty reference","expected":"","passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"reference order\", \"actual\": \"Alpha Zulu\", \"expected\": \"Zulu Alpha\", \"passed\": false}, {\"check\": \"aria empty\", \"actual\": \"\", \"expected\": \"\", \"passed\": true}, {\"check\": \"native empty\", \"actual\": \"\", \"expected\": \"\", \"passed\": true}, {\"check\": \"hidden\", \"actual\": \"\", \"expected\": \"\", \"passed\": true}, {\"check\": \"visible\", \"actual\": \"visible\", \"expected\": \"visible\", \"passed\": true}, {\"check\": \"empty reference\", \"actual\": \"\", \"expected\": \"\", \"passed\": true}, {\"check\": \"parameterized label content\", \"actual\": \"label1\", \"expected\": \"label1\", \"passed\": true}, {\"check\": \"repeat empty reference\", \"actual\": \"\", \"expected\": \"\", \"passed\": true}], \"passed\": false}\n"}},"member_only":{"stages":["fixed"],"fields":["implementations.fixed","verification.fixed","harness","repair"],"note":"The verified repair, its recorded checks, the repair description, and the scoring harness are available to members."}}