{"abstract":"Literal text is trimmed while constructing object offsets.","category":"Accessibility interaction semantics","checks":8,"contract":"Input [tokens,alt_mode] where tokens are [kind,text,exposed], kinds text, object, break, decoration. Ignore unexposed or decoration tokens. Text is copied exactly; break becomes LF; object becomes U+FFFC unless alt_mode, when nonempty alternative text is used and empty alternative falls back to U+FFFC. Return [flattened,objects] with objects [token_index,start,end,alternative]. All offsets are codepoints in output; ordinary text does not add object mappings. Adjacent objects remain separate; zero-length text has no effect.","contract_signature":"data","evaluation_group":"s3-accessibility-embedded-text-objects","failed_approach":"The local repair substitutes if kind == 'text': text += value+' ' but still mishandles the regression fixtures.","family":"s3-accessibility-embedded-text-objects-literal-text","id":"FA-53816","implementations":{"attempt":{"sha256":"0bcd9799fe84f8ef6843a935df61a7800cb0f680a73727addcb8763f9e6cd361","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(data):\n    tokens,alt_mode = data\n    text = ''\n    objects = []\n    for index,(kind,value,exposed) in enumerate(tokens):\n        if not exposed or kind == 'decoration': continue\n        start = len(text)\n        if kind == 'text': text += value+' '\n        elif kind == 'break': text += '\\n'\n        elif kind == 'object':\n            text += value if alt_mode and value else '\\ufffc'\n            objects.append([index,start,len(text),value])\n    return [text,objects]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('contract fixture 1', solve([[['text','A'*N,True],['object','Cat',True],['text','Z',True]],False],), ['A'*N+'￼Z',[[1,N,N+1,'Cat']]])\ncheck('contract fixture 2', solve([[['text','A'*N,True],['object','Cat',True],['object','',True]],True],), ['A'*N+'Cat￼',[[1,N,N+3,'Cat'],[2,N+3,N+4,'']]])\ncheck('contract fixture 3', solve([[['decoration','*',True],['object','Hidden',False],['text','X',True]],False],), ['X',[]])\ncheck('contract fixture 4', solve([[['text','A',True],['break','ignored',True],['text','B',True]],False],), ['A\\nB',[]])\ncheck('contract fixture 5', solve([[['object','A',True],['object','B',True]],False],), ['￼￼',[[0,0,1,'A'],[1,1,2,'B']]])\ncheck('contract fixture 6', solve([[['text','',True]],True],), ['',[]])\ncheck('contract fixture 7', solve([[['text',' A ',True]],False],), [' A ',[]])\ncheck('contract fixture 8', solve([[],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":"1ce0dbc6dbe4299feecdff77675d8731ba62db1a8be5c81fbd6a9afcaf30c0d4","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(data):\n    tokens,alt_mode = data\n    text = ''\n    objects = []\n    for index,(kind,value,exposed) in enumerate(tokens):\n        if not exposed or kind == 'decoration': continue\n        start = len(text)\n        if kind == 'text': text += value.strip()\n        elif kind == 'break': text += '\\n'\n        elif kind == 'object':\n            text += value if alt_mode and value else '\\ufffc'\n            objects.append([index,start,len(text),value])\n    return [text,objects]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('contract fixture 1', solve([[['text','A'*N,True],['object','Cat',True],['text','Z',True]],False],), ['A'*N+'￼Z',[[1,N,N+1,'Cat']]])\ncheck('contract fixture 2', solve([[['text','A'*N,True],['object','Cat',True],['object','',True]],True],), ['A'*N+'Cat￼',[[1,N,N+3,'Cat'],[2,N+3,N+4,'']]])\ncheck('contract fixture 3', solve([[['decoration','*',True],['object','Hidden',False],['text','X',True]],False],), ['X',[]])\ncheck('contract fixture 4', solve([[['text','A',True],['break','ignored',True],['text','B',True]],False],), ['A\\nB',[]])\ncheck('contract fixture 5', solve([[['object','A',True],['object','B',True]],False],), ['￼￼',[[0,0,1,'A'],[1,1,2,'B']]])\ncheck('contract fixture 6', solve([[['text','',True]],True],), ['',[]])\ncheck('contract fixture 7', solve([[['text',' A ',True]],False],), [' A ',[]])\ncheck('contract fixture 8', solve([[],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":"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.","method":"Deterministic executable model with adversarial boundary fixtures.","provenance":{"created_by":"Failure Map","dependencies":"Python standard library","family":"s3-accessibility-embedded-text-objects-literal-text","generated_at":"2026-09-29T14:45:42.814812+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Offline accessibility bridge model with explicit policy; useful for testing semantic API adapters independently of browser implementations.","root_cause":"The literal text decision in the embedded text objects adapter violates its declared contract.","sha256":"dd094e0dc4187befae672056765f9edb9bfb527d39bc3346d0651aebd0dfff03","title":"Literal text is trimmed while constructing object offsets · 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":50.919,"exit_code":1,"observations":[{"actual":["A ￼Z ",[[1,2,3,"Cat"]]],"check":"contract fixture 1","expected":["A￼Z",[[1,1,2,"Cat"]]],"passed":false},{"actual":["A Cat￼",[[1,2,5,"Cat"],[2,5,6,""]]],"check":"contract fixture 2","expected":["ACat￼",[[1,1,4,"Cat"],[2,4,5,""]]],"passed":false},{"actual":["X ",[]],"check":"contract fixture 3","expected":["X",[]],"passed":false},{"actual":["A \nB ",[]],"check":"contract fixture 4","expected":["A\nB",[]],"passed":false},{"actual":["￼￼",[[0,0,1,"A"],[1,1,2,"B"]]],"check":"contract fixture 5","expected":["￼￼",[[0,0,1,"A"],[1,1,2,"B"]]],"passed":true},{"actual":[" ",[]],"check":"contract fixture 6","expected":["",[]],"passed":false},{"actual":[" A  ",[]],"check":"contract fixture 7","expected":[" A ",[]],"passed":false},{"actual":["",[]],"check":"contract fixture 8","expected":["",[]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"contract fixture 1\", \"actual\": [\"A ￼Z \", [[1, 2, 3, \"Cat\"]]], \"expected\": [\"A￼Z\", [[1, 1, 2, \"Cat\"]]], \"passed\": false}, {\"check\": \"contract fixture 2\", \"actual\": [\"A Cat￼\", [[1, 2, 5, \"Cat\"], [2, 5, 6, \"\"]]], \"expected\": [\"ACat￼\", [[1, 1, 4, \"Cat\"], [2, 4, 5, \"\"]]], \"passed\": false}, {\"check\": \"contract fixture 3\", \"actual\": [\"X \", []], \"expected\": [\"X\", []], \"passed\": false}, {\"check\": \"contract fixture 4\", \"actual\": [\"A \\nB \", []], \"expected\": [\"A\\nB\", []], \"passed\": false}, {\"check\": \"contract fixture 5\", \"actual\": [\"￼￼\", [[0, 0, 1, \"A\"], [1, 1, 2, \"B\"]]], \"expected\": [\"￼￼\", [[0, 0, 1, \"A\"], [1, 1, 2, \"B\"]]], \"passed\": true}, {\"check\": \"contract fixture 6\", \"actual\": [\" \", []], \"expected\": [\"\", []], \"passed\": false}, {\"check\": \"contract fixture 7\", \"actual\": [\" A  \", []], \"expected\": [\" A \", []], \"passed\": false}, {\"check\": \"contract fixture 8\", \"actual\": [\"\", []], \"expected\": [\"\", []], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":43.895,"exit_code":1,"observations":[{"actual":["A￼Z",[[1,1,2,"Cat"]]],"check":"contract fixture 1","expected":["A￼Z",[[1,1,2,"Cat"]]],"passed":true},{"actual":["ACat￼",[[1,1,4,"Cat"],[2,4,5,""]]],"check":"contract fixture 2","expected":["ACat￼",[[1,1,4,"Cat"],[2,4,5,""]]],"passed":true},{"actual":["X",[]],"check":"contract fixture 3","expected":["X",[]],"passed":true},{"actual":["A\nB",[]],"check":"contract fixture 4","expected":["A\nB",[]],"passed":true},{"actual":["￼￼",[[0,0,1,"A"],[1,1,2,"B"]]],"check":"contract fixture 5","expected":["￼￼",[[0,0,1,"A"],[1,1,2,"B"]]],"passed":true},{"actual":["",[]],"check":"contract fixture 6","expected":["",[]],"passed":true},{"actual":["A",[]],"check":"contract fixture 7","expected":[" A ",[]],"passed":false},{"actual":["",[]],"check":"contract fixture 8","expected":["",[]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"contract fixture 1\", \"actual\": [\"A￼Z\", [[1, 1, 2, \"Cat\"]]], \"expected\": [\"A￼Z\", [[1, 1, 2, \"Cat\"]]], \"passed\": true}, {\"check\": \"contract fixture 2\", \"actual\": [\"ACat￼\", [[1, 1, 4, \"Cat\"], [2, 4, 5, \"\"]]], \"expected\": [\"ACat￼\", [[1, 1, 4, \"Cat\"], [2, 4, 5, \"\"]]], \"passed\": true}, {\"check\": \"contract fixture 3\", \"actual\": [\"X\", []], \"expected\": [\"X\", []], \"passed\": true}, {\"check\": \"contract fixture 4\", \"actual\": [\"A\\nB\", []], \"expected\": [\"A\\nB\", []], \"passed\": true}, {\"check\": \"contract fixture 5\", \"actual\": [\"￼￼\", [[0, 0, 1, \"A\"], [1, 1, 2, \"B\"]]], \"expected\": [\"￼￼\", [[0, 0, 1, \"A\"], [1, 1, 2, \"B\"]]], \"passed\": true}, {\"check\": \"contract fixture 6\", \"actual\": [\"\", []], \"expected\": [\"\", []], \"passed\": true}, {\"check\": \"contract fixture 7\", \"actual\": [\"A\", []], \"expected\": [\" A \", []], \"passed\": false}, {\"check\": \"contract fixture 8\", \"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."}}