Set the decision and its input
RecordR1 requires EvidenceE1. The faulty interface reveals it only on hover, leaving it hidden when the record is focused. The repair adds Show evidence, opening that same text through keyboard Enter or touch. Keeping hidden text in the DOM does not complete reading.
| Case | Input JSON |
|---|---|
| Base test | {"method":"keyboard"} |
Run the supplied comparison
The browser performs actual hover, Enter and tap, then inspects computed visibility. Visibility does not grant permission to protected data or mark a case resolved.
| Path | Output JSON |
|---|---|
| Faulty path | {"visible":false,"text":"Evidence E1"} |
| Required path | {"visible":true,"text":"Evidence E1"} |
import assert from 'node:assert/strict';
import {createRequire} from 'node:module';
const htmlEscape=s=>String(s).replace(/&/g,'&').replace(/</g,'<').replace(/>/g,'>').replace(/"/g,'"');
async function withPage(action,options={}){
const require=createRequire(import.meta.url);const {chromium}=require('playwright');
const browser=await chromium.launch({headless:true});
try{const context=await browser.newContext(options);const page=await context.newPage();
const requests=[];await page.route('**/*',route=>{requests.push(route.request().url());return route.abort();});
return await action(page,context,requests);
}finally{await browser.close();}
}
const run=async function run(i,corrected=true){
if(!['keyboard','touch','pointer'].includes(i.method))return {held:true};
return withPage(async page=>{await page.setContent('<style>#tip{display:none}.record:hover #tip{display:block}</style><div class="record" tabindex="0" id="record">Record R1'+(corrected?'<button id="show">Show evidence</button>':'')+'<span id="tip">Evidence E1</span></div>');
if(corrected)await page.evaluate(()=>document.querySelector('#show').addEventListener('click',()=>document.querySelector('#tip').style.display='block'));
if(i.method==='pointer')await page.hover('#record');else if(corrected&&i.method==='touch')await page.tap('#show');else if(corrected){await page.focus('#show');await page.press('#show','Enter');}else await page.focus('#record');
return page.evaluate(()=>({visible:getComputedStyle(document.querySelector('#tip')).display!=='none',text:document.querySelector('#tip').textContent}));
},{hasTouch:i.method==='touch'});
};
const cases=[{"input":{"method":"keyboard"},"corrected":false,"expected":{"visible":false,"text":"Evidence E1"}},{"input":{"method":"keyboard"},"corrected":true,"expected":{"visible":true,"text":"Evidence E1"}},{"input":{"method":"touch"},"corrected":true,"expected":{"visible":true,"text":"Evidence E1"}},{"input":{"method":"pointer"},"corrected":true,"expected":{"visible":true,"text":"Evidence E1"}}];
for(const test of cases){const actual=await run(test.input,test.corrected);assert.deepEqual(actual,test.expected);console.log(actual);}
Choose from the boundary evidence
Touch and pointer boundaries both expose E1 in the repaired interface. The text identity is retained.
- Identify required evidence
- Open it through each method
- Inspect actual visibility
Keep access policy separate from disclosure mechanics.
| Condition | Input JSON | Expected output JSON |
|---|---|---|
| touch disclosure | {"method":"touch"} | {"visible":true,"text":"Evidence E1"} |
| pointer disclosure | {"method":"pointer"} | {"visible":true,"text":"Evidence E1"} |
What must the base keyboard action reveal?
Show the worked answer
The same visibly displayed EvidenceE1, not merely an invisible text node.