Repository navigation
Add retained web accessibility and Text view - #59
dutch-casa wants to merge 33 commits into
Conversation
Exclude disabled descendants from hit testing and keyboard focus, admit read-only editor focus without edit authority, and keep source-ordered link identity across modal restoration. Extend upstream's existing browser projector with retained native editors, control names and state, and help descriptions. Use clipped semantic content, keep focus off the aria-hidden canvas, and preserve IME identity and current input admission. Exercise the browser accessibility tree with actual Rune Kit controls. Keep export tooling and native-paste expansion separate, document the shared desktop behavior, and leave native accessibility adapters and certification out of scope.
Link Field controls to their retained caption nodes, remove duplicate sequential link stops, and preserve option and tab content names. Native pinch zoom remains available while Rune handles one-finger scrolling. Keep readonly Return, selection and copy on the non-editing path and deny native IME activation. Regression checks reproduced each defect before the correction; focusable pressable naming passed and its implementation is unchanged. Document disabled input admission and keep the changelog to one entry. Static export and native-paste expansion remain separate.
Project range values, invalid state, control relationships and keyboard cursors from the retained scene. Reuse Kit state and keyboard owners for disclosures, menus, tables, trees and pane resizing. Keep standalone header toggles independent of selection-following rows. Use the existing semantic DOM for optional browser text presentation. Preserve editor identity and document selection through reconciliation. Keep Safari native activation and changing control names observable without changing the renderer or menu motion. Exercise browser input, captions, keyboard behavior, reflow, user text styles and clipboard operations. Document author responsibilities and the limits of the verified browser and screen-reader paths.
… mirror Co-authored-by: Dutch Casadaban <[email protected]>
Co-authored-by: Dutch Casadaban <[email protected]>
…they are Co-authored-by: Dutch Casadaban <[email protected]>
…editors Co-authored-by: Dutch Casadaban <[email protected]>
Memo children flatten through flatten_ref, which kept the child's own accessibility state, and a reused memo kept that slice when only an ancestor's disabled flag changed. Disabled is now a hot flag beside inert, inherited on both flatten paths and part of the memo's inherited state, so the closure is not rebuilt when an ancestor toggles it. A click on the disabled subtree reaches whatever is drawn behind it. Co-authored-by: Dutch Casadaban <[email protected]>
ElementInfo: :inert followed input admission, so a disabled control was reported inert. Inert now means the element is outside the accessibility tree: an inert subtree, content behind the active modal, or an element that is leaving. Co-authored-by: Dutch Casadaban <[email protected]>
The mounted window already refused input, but the offscreen selection walk only inherited inert. A disabled list, and a disabled row inside one, now stay out of that walk. Co-authored-by: Dutch Casadaban <[email protected]>
Return on a focused combobox followed the wasm target, so host tests could only see one side of the rule. The web shell now sets that policy, and other hosts leave Return with the window's default button. Co-authored-by: Dutch Casadaban <[email protected]>
Co-authored-by: Dutch Casadaban <[email protected]>
Co-authored-by: Dutch Casadaban <[email protected]>
Co-authored-by: Dutch Casadaban <[email protected]>
Co-authored-by: Dutch Casadaban <[email protected]>
Co-authored-by: Dutch Casadaban <[email protected]>
Co-authored-by: Dutch Casadaban <[email protected]>
…d canvas clears it Co-authored-by: Dutch Casadaban <[email protected]>
The name, collapse and relationship pass lives in one tree. The web mirror projects it, and the inspector reports the same computed name. A pressable that contains another pressable, a link or a slider keeps each node, so every Rust tab stop has a DOM node. aria-selected is set only for an item in a selection, including an unselected one, and a multi-select grid says so. A virtual row reports its place in the full set. A heading with no level is level 2. Text keyed flow- stays separate nodes. a11y_json names every field with a word, and checked is an object. El::pressed and El::current set aria-pressed and aria-current. A paint-only change does not reserialize the tree. Co-authored-by: Dutch Casadaban <[email protected]>
…rol checkable Co-authored-by: Dutch Casadaban <[email protected]>
Co-authored-by: Dutch Casadaban <[email protected]>
Co-authored-by: Dutch Casadaban <[email protected]>
Co-authored-by: Dutch Casadaban <[email protected]>
Co-authored-by: Dutch Casadaban <[email protected]>
…ion stays disabled Co-authored-by: Dutch Casadaban <[email protected]>
…osure Co-authored-by: Dutch Casadaban <[email protected]>
Co-authored-by: Dutch Casadaban <[email protected]>
…m the keyboard Co-authored-by: Dutch Casadaban <[email protected]>
Co-authored-by: Dutch Casadaban <[email protected]>
Co-authored-by: Dutch Casadaban <[email protected]>
|
Thanks for this. It's a welcome step for the web target, and it's the reason we'd like to help: we probably wouldn't have taken this on otherwise, but since the effort is already under way, it seems worth going the extra mile to WCAG 2.1 Level AA. WCAG is the standard that most web accessibility laws and procurement rules point to (57 of the 83 in W3C's list), so an app built on Rune's web target could actually make a conformance claim. Since this PR opened, Would you take web support that projects the
Happy to do the port if that's the direction you want. |
|
@kitlangton @Hona, since this would build on the AccessKit tree from e58b87c, your view on the direction above would help before anyone ports it. Oh and when I say “we” above, we really mean me and opium 5.5 🫠 |
|
thanks for this. rune is agent-driven, so we don't take pull requests. if you'd like a change or a bug fixed, have your agent open an issue describing it (https://github.com/anomalyco/rune/issues) and our agents will pick it up. |
What changes
This adds a retained semantic DOM mirror beside the web canvas so browser accessibility tools and Find-in-page can read Rune content. It reuses Rune's current focus, modal admission, actions and editing protocol rather than maintaining a second application tree.
The branch includes current upstream
devwithout rewriting its existing commits.Verification
Verified on macOS with Rust 1.99.0, wasm-bindgen 0.2.129 and Chromium:
cargo check --workspace --all-targetscargo test -p rune -p rune-kit --features rune-kit/markdownscripts/web-build.sh web-hello --out target/web-pr(release artifact; installed LLD selected for this local toolchain)node scripts/web-focus.mjsnode scripts/web-smoke.mjs target/web-pr target/web-pr-proofscripts/file-size.sh(passes with existing size warnings)git diff --checkThe browser run covers WebGPU rendering, idle frames, editing/composition, clipboard, touch and pinch zoom, native accessibility metadata, Kit interactions, and Text view reflow. Also inspected canvas/Text view rendering and exercised disclosure, Text view actions and table sorting in Chromium.
Limits
This does not add native AccessKit adapters or certify WCAG conformance. Virtual lists expose mounted rows. Physical mobile IME, real-device touch and Safari/VoiceOver were not verified in this run. Applications still own content alternatives, contrast and custom control behavior.