Fix Voice Access numbering background controls when clipper is open (A11y MAS 4.3.1)#652
Fix Voice Access numbering background controls when clipper is open (A11y MAS 4.3.1)#652
Conversation
…e=dialog and aria-modal=true Agent-Logs-Url: https://github.com/OneNoteDev/WebClipper/sessions/dac056b7-abc8-4fe3-8c8f-59f5a34f4146 Co-authored-by: KethanaReddy7 <257986085+KethanaReddy7@users.noreply.github.com>
|
@copilot The current changes are not working as expected. With the clipper open, Voice Access still shows number overlays for background page elements, not just the clipper UI. Please review the current implementation, identify why the background is still being exposed, and suggest the correct fix. |
…y from inject script Agent-Logs-Url: https://github.com/OneNoteDev/WebClipper/sessions/6ec55267-0506-4b18-a277-54f3f90edcb7 Co-authored-by: KethanaReddy7 <257986085+KethanaReddy7@users.noreply.github.com>
The previous fix was applied in the wrong place. The clipper UI runs inside an iframe appended to The correct fix is in <html>
<head>…</head>
<body aria-hidden="true">…page content…</body> ← hidden from Voice Access
<iframe id="oneNoteWebClipper">…</iframe> ← still accessible
</html>Three cases are handled (commit
|
|
@copilot Please review the code, it wasn't able to fix the issue |
…s background numbering Agent-Logs-Url: https://github.com/OneNoteDev/WebClipper/sessions/b160429a-a946-4869-9c23-834931415ee1 Co-authored-by: KethanaReddy7 <257986085+KethanaReddy7@users.noreply.github.com>
The root gap was that The fix (commit <!-- When clipper is open -->
<html>
<head>…</head>
<body aria-hidden="true" inert>…page content…</body> ← removed from AT tree + pointer events disabled
<iframe id="oneNoteWebClipper">…</iframe> ← unaffected, still accessible
</html>
All three lifecycle points are covered: first open (constructor), re-open ( |
When the OneNote Clipper UI is open, Voice Access displays numbered overlays on background page controls — elements that should be unreachable while the clipper is active.
The root cause: the clipper UI runs inside an iframe appended to
document.documentElement, giving it a separate accessibility tree from the host page.aria-modal="true"inside the iframe cannot suppress Voice Access numbering of parent page elements. The fix must happen in the inject script, which runs in the host page context.Since the iframe is a child of
<html>(not<body>), settingaria-hidden="true"andinertondocument.bodyhides all page content from assistive technologies while keeping the clipper iframe (a sibling of<body>) fully accessible:aria-hidden="true"removes body elements from the AT accessibility tree. Theinertattribute additionally disables all pointer events on body elements — this is necessary because Voice Access on Windows (built on UI Automation) can also scan for elements capable of receiving pointer/mouse events independently of AT-tree visibility, soaria-hiddenalone is insufficient.Changes
clipperInject.ts: Setaria-hidden="true"andinertondocument.bodywhen the clipper opens, and remove both when it closes. Three cases are covered:toggleClipper()): body is marked inert and hidden when the frame is shown againhideUihandler): botharia-hiddenandinertare removed so page controls are fully accessible againmainController.tsx: Replacerole="main"withrole="dialog"and addaria-modal="true"on the main controller container, which remains beneficial for assistive technologies that can traverse same-origin iframes.mainController_tests.tsx: Add regression test assertingrole="dialog"andaria-modal="true"are present on the rendered main controller element.Original prompt
Work item: AB#8780932
Created via Azure DevOps
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.