{"abstract":"A control can reference itself as its controlled target.","category":"Assistive semantics","checks":7,"contract":"Resolve target IDs in caller order, deduplicate, and exclude self references, missing nodes, incompatible roles and hidden targets.","evaluation_group":"xi-aria-relationships","failed_approach":"Keeping only self references discards valid relationships.","family":"xi-aria-relationships-self","id":"FA-8456","implementations":{"attempt":{"sha256":"3ae9055d7c1074f568eed14be07b282281831c3d6c8a8b3a64ef7e59d985501e","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(ids, registry, role, required_role, self_id):\n    seen = set()\n    result = []\n    for ident in ids:\n        if ident != self_id: continue\n        if ident in seen: continue\n        if ident not in registry: continue\n        if registry[ident]['role'] != required_role: continue\n        if registry[ident]['hidden']: continue\n        seen.add(ident)\n        result.append(ident)\n    return result\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('self', solve(['self','a'], {'self':{'role':'panel','hidden':False},'a':{'role':'panel','hidden':False}}, 'tab', 'panel', 'self'), ['a'])\ncheck('dedup', solve(['a','a','b'], {'a':{'role':'panel','hidden':False},'b':{'role':'panel','hidden':False}}, 'tab', 'panel', 'self'), ['a', 'b'])\ncheck('missing', solve(['a','gone','b'], {'a':{'role':'panel','hidden':False},'b':{'role':'panel','hidden':False}}, 'tab', 'panel', 'self'), ['a', 'b'])\ncheck('role', solve(['bad','a'], {'bad':{'role':'button','hidden':False},'a':{'role':'panel','hidden':False}}, 'tab', 'panel', 'self'), ['a'])\ncheck('hidden', solve(['bad','a'], {'bad':{'role':'panel','hidden':True},'a':{'role':'panel','hidden':False}}, 'tab', 'panel', 'self'), ['a'])\ncheck('parameterized relationship identity', solve([str(N)], {str(N):dict(role='panel',hidden=False)}, 'tab', 'panel', 'self'), [str(N)])\nfor repetition in range(N):\n    check('repeat hidden', solve(['bad','a'], {'bad':{'role':'panel','hidden':True},'a':{'role':'panel','hidden':False}}, 'tab', 'panel', 'self'), ['a'])\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":"e24557931766d2f0912dc7efcf05d38e007b7ef2e3672ef019ffc6edf3927de4","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(ids, registry, role, required_role, self_id):\n    seen = set()\n    result = []\n    for ident in ids:\n        if False: continue\n        if ident in seen: continue\n        if ident not in registry: continue\n        if registry[ident]['role'] != required_role: continue\n        if registry[ident]['hidden']: continue\n        seen.add(ident)\n        result.append(ident)\n    return result\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('self', solve(['self','a'], {'self':{'role':'panel','hidden':False},'a':{'role':'panel','hidden':False}}, 'tab', 'panel', 'self'), ['a'])\ncheck('dedup', solve(['a','a','b'], {'a':{'role':'panel','hidden':False},'b':{'role':'panel','hidden':False}}, 'tab', 'panel', 'self'), ['a', 'b'])\ncheck('missing', solve(['a','gone','b'], {'a':{'role':'panel','hidden':False},'b':{'role':'panel','hidden':False}}, 'tab', 'panel', 'self'), ['a', 'b'])\ncheck('role', solve(['bad','a'], {'bad':{'role':'button','hidden':False},'a':{'role':'panel','hidden':False}}, 'tab', 'panel', 'self'), ['a'])\ncheck('hidden', solve(['bad','a'], {'bad':{'role':'panel','hidden':True},'a':{'role':'panel','hidden':False}}, 'tab', 'panel', 'self'), ['a'])\ncheck('parameterized relationship identity', solve([str(N)], {str(N):dict(role='panel',hidden=False)}, 'tab', 'panel', 'self'), [str(N)])\nfor repetition in range(N):\n    check('repeat hidden', solve(['bad','a'], {'bad':{'role':'panel','hidden':True},'a':{'role':'panel','hidden':False}}, 'tab', 'panel', 'self'), ['a'])\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"},"fixed":{"sha256":"35c8f31361a84cc49c4586cbfae276274bf94ce235f540c7055c04419979d112","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(ids, registry, role, required_role, self_id):\n    seen = set()\n    result = []\n    for ident in ids:\n        if ident == self_id: continue\n        if ident in seen: continue\n        if ident not in registry: continue\n        if registry[ident]['role'] != required_role: continue\n        if registry[ident]['hidden']: continue\n        seen.add(ident)\n        result.append(ident)\n    return result\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('self', solve(['self','a'], {'self':{'role':'panel','hidden':False},'a':{'role':'panel','hidden':False}}, 'tab', 'panel', 'self'), ['a'])\ncheck('dedup', solve(['a','a','b'], {'a':{'role':'panel','hidden':False},'b':{'role':'panel','hidden':False}}, 'tab', 'panel', 'self'), ['a', 'b'])\ncheck('missing', solve(['a','gone','b'], {'a':{'role':'panel','hidden':False},'b':{'role':'panel','hidden':False}}, 'tab', 'panel', 'self'), ['a', 'b'])\ncheck('role', solve(['bad','a'], {'bad':{'role':'button','hidden':False},'a':{'role':'panel','hidden':False}}, 'tab', 'panel', 'self'), ['a'])\ncheck('hidden', solve(['bad','a'], {'bad':{'role':'panel','hidden':True},'a':{'role':'panel','hidden':False}}, 'tab', 'panel', 'self'), ['a'])\ncheck('parameterized relationship identity', solve([str(N)], {str(N):dict(role='panel',hidden=False)}, 'tab', 'panel', 'self'), [str(N)])\nfor repetition in range(N):\n    check('repeat hidden', solve(['bad','a'], {'bad':{'role':'panel','hidden':True},'a':{'role':'panel','hidden':False}}, 'tab', 'panel', 'self'), ['a'])\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-aria-relationships-self","generated_at":"2026-09-29T14:38:21.462138+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"A deterministic model of accessible relationship resolution; this isolates one interface invariant without requiring a browser.","repair":"Implement the self operation as `if ident == self_id: continue`.","root_cause":"The self operation uses `if False: continue` where the contract requires `if ident == self_id: continue`.","sha256":"78bc75ca8044291d29e9bae3733b813a1ae7f5983ac795b7477c293f4c17c2f5","title":"Accessible relationship resolution: A control can reference itself as its controlled target · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":38.401,"exit_code":1,"observations":[{"actual":["self"],"check":"self","expected":["a"],"passed":false},{"actual":[],"check":"dedup","expected":["a","b"],"passed":false},{"actual":[],"check":"missing","expected":["a","b"],"passed":false},{"actual":[],"check":"role","expected":["a"],"passed":false},{"actual":[],"check":"hidden","expected":["a"],"passed":false},{"actual":[],"check":"parameterized relationship identity","expected":["1"],"passed":false},{"actual":[],"check":"repeat hidden","expected":["a"],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"self\", \"actual\": [\"self\"], \"expected\": [\"a\"], \"passed\": false}, {\"check\": \"dedup\", \"actual\": [], \"expected\": [\"a\", \"b\"], \"passed\": false}, {\"check\": \"missing\", \"actual\": [], \"expected\": [\"a\", \"b\"], \"passed\": false}, {\"check\": \"role\", \"actual\": [], \"expected\": [\"a\"], \"passed\": false}, {\"check\": \"hidden\", \"actual\": [], \"expected\": [\"a\"], \"passed\": false}, {\"check\": \"parameterized relationship identity\", \"actual\": [], \"expected\": [\"1\"], \"passed\": false}, {\"check\": \"repeat hidden\", \"actual\": [], \"expected\": [\"a\"], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":39.772,"exit_code":1,"observations":[{"actual":["self","a"],"check":"self","expected":["a"],"passed":false},{"actual":["a","b"],"check":"dedup","expected":["a","b"],"passed":true},{"actual":["a","b"],"check":"missing","expected":["a","b"],"passed":true},{"actual":["a"],"check":"role","expected":["a"],"passed":true},{"actual":["a"],"check":"hidden","expected":["a"],"passed":true},{"actual":["1"],"check":"parameterized relationship identity","expected":["1"],"passed":true},{"actual":["a"],"check":"repeat hidden","expected":["a"],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"self\", \"actual\": [\"self\", \"a\"], \"expected\": [\"a\"], \"passed\": false}, {\"check\": \"dedup\", \"actual\": [\"a\", \"b\"], \"expected\": [\"a\", \"b\"], \"passed\": true}, {\"check\": \"missing\", \"actual\": [\"a\", \"b\"], \"expected\": [\"a\", \"b\"], \"passed\": true}, {\"check\": \"role\", \"actual\": [\"a\"], \"expected\": [\"a\"], \"passed\": true}, {\"check\": \"hidden\", \"actual\": [\"a\"], \"expected\": [\"a\"], \"passed\": true}, {\"check\": \"parameterized relationship identity\", \"actual\": [\"1\"], \"expected\": [\"1\"], \"passed\": true}, {\"check\": \"repeat hidden\", \"actual\": [\"a\"], \"expected\": [\"a\"], \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":38.597,"exit_code":0,"observations":[{"actual":["a"],"check":"self","expected":["a"],"passed":true},{"actual":["a","b"],"check":"dedup","expected":["a","b"],"passed":true},{"actual":["a","b"],"check":"missing","expected":["a","b"],"passed":true},{"actual":["a"],"check":"role","expected":["a"],"passed":true},{"actual":["a"],"check":"hidden","expected":["a"],"passed":true},{"actual":["1"],"check":"parameterized relationship identity","expected":["1"],"passed":true},{"actual":["a"],"check":"repeat hidden","expected":["a"],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"self\", \"actual\": [\"a\"], \"expected\": [\"a\"], \"passed\": true}, {\"check\": \"dedup\", \"actual\": [\"a\", \"b\"], \"expected\": [\"a\", \"b\"], \"passed\": true}, {\"check\": \"missing\", \"actual\": [\"a\", \"b\"], \"expected\": [\"a\", \"b\"], \"passed\": true}, {\"check\": \"role\", \"actual\": [\"a\"], \"expected\": [\"a\"], \"passed\": true}, {\"check\": \"hidden\", \"actual\": [\"a\"], \"expected\": [\"a\"], \"passed\": true}, {\"check\": \"parameterized relationship identity\", \"actual\": [\"1\"], \"expected\": [\"1\"], \"passed\": true}, {\"check\": \"repeat hidden\", \"actual\": [\"a\"], \"expected\": [\"a\"], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}