Hide collapsed settings dialog and results panel from assistive tech and tab order - #122
Open
usehoplite[bot] wants to merge 1 commit into
Open
Hide collapsed settings dialog and results panel from assistive tech and tab order#122usehoplite[bot] wants to merge 1 commit into
usehoplite[bot] wants to merge 1 commit into
Conversation
The Settings dialog and the Success/History panel are hidden with opacity and transform only, so on load their contents stay in the accessibility tree: screen readers announce an invisible dialog and Success heading, and the 'Clear history' and history 'Copy' buttons remain Tab-focusable while off-screen. visibility:hidden (flipped after the close transition, immediately on open) removes them from both the AT tree and the tab order until actually shown. Co-authored-by: Yinhao Chen <pxxyhc@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
docs/mark.html(and its packaged copyfuckmark/webui/mark.html) hid the Settings dialog and the Success/History panel withopacity/transformonly. Both stayed in the accessibility tree while visually closed, so on page load screen readers announced an invisibledialog "Settings"and a"Success"heading, and keyboard users could Tab into invisible controls: the sheet's Clear history button and each history item's Copy button.The fix adds
visibility: hiddento the closed state of.sheetand.afterandvisibility: visibleon their.open/.onstates, with the visibility flip delayed to the end of the close transition so the animations still play.visibility: hiddenremoves the subtrees from both the accessibility tree and sequential focus navigation; both properties flip back immediately on open.Verified
dialog "Settings"+ paragraph +button "Clear history",heading "Success"+ success message, full History section including"No history yet".Settingsbutton,FuckMarkheading, textarea,Remove marksbutton. Opening the gear re-exposes the dialog and Clear history; closing removes them again.?demo=1) still detects the watermarked sample (170 chars → 135 insertions stripped), reveals Success/History with working Copy button; fail demo (?demo=fail) still shows the closed-set miss copy, Contact us → two-step form, and Try again → restore, with focus moves intact.Settings dialog still renders and animates identically when opened:
Tests
tests/test_web.py,tests/test_mark_page.py,tests/test_hidden_scan_spec.py,tests/test_scan_wasm.py,tests/test_install_release_hardening.py,tests/test_demo_page.py,tests/test_browser_extension.py,tests/test_vscode_scanner_parity.py— all pass (46 passed, 1 skipped). Byte parity betweendocs/mark.htmlandfuckmark/webui/mark.htmlre-verified withcmp; both files re-scanned with the project's ownscan_hidden_characters(..., language="html")— zero hidden characters introduced.