feat(a11y): meta.source + opt-in --native platform accessibility tree - #183
Merged
Conversation
Iteration 143: ff-rdp a11y now always reports meta.source
("native"/"js-fallback", plus a reason) so callers can tell the real
platform accessibility tree apart from the DOM-derived JS fallback.
Adds an opt-in --native flag that enables Firefox's accessibility
service via parentAccessibilityActor.enable() when it is off, walks
the native tree, and restores the prior state afterward — never the
default (DEC-027). Also bounds walker requests to a 3s read timeout so
a stalled service costs seconds, not the full configured --timeout.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…dent iter-143 established two reusable patterns (DEC-027 restore-only-what- you-changed, and bounded RDP read-timeouts around calls that stall instead of erroring) directly applicable to iter-144's Theme C field- honesty redesign and any stalling calls Theme D/F turn up. Co-Authored-By: Claude Opus 5 <noreply@anthropic.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.
Summary
ff-rdp a11y(anda11y --critical,a11y contrast) now always reportsmeta.source("native"|"js-fallback", plusmeta.source_reason) so a caller can tell the real Firefox platform accessibility tree apart from the DOM-derived JS approximation without a separate--verboseround-trip.--nativeflag (commands::a11y::run_native_opt_in) that enables Firefox's platform accessibility service viaparentAccessibilityActor.enable()when it's off, walks the native tree, and restores the prior state afterward — but only when this call is what turned it on. Never the default (per DEC-027:enable()is browser-global/process-wide and itsdisable()can be blocked by an active Windows screen reader). Any failure (enable failing,bootstrap()still reporting disabled, a stalled walker request) surfaces as an explicit error, never a silent fallback.getWalker/root accessor/children) to a 3s read timeout (with_walker_timeout), so a stalled platform service (iter-136: the walker never replies while the service is off) costs a few seconds instead of the full configured--timeout.AccessibilityActor::enable_service/disable_service(ff-rdp-core) andconnection_meta::merge_source(ff-rdp-cli), following the same unconditional-merge pattern iter-134 established formeta.route.Spec drift
No local Firefox checkout (
FF_RDP_FIREFOX_PATH) was available in this environment to run the staticrdp-spec-reviewerdiff-vs-source comparison, so this section is filled in manually per its fallback rule ("if the Firefox checkout is not available, say so and list the actors that could not be reviewed").crates/ff-rdp-core/src/actors/accessibility.rs— could not be statically diffed againstdevtools/shared/specs/accessibility.jsin this run.enable()/disable()onparentAccessibilityActorwere already documented as existing lifecycle methods inkb/rdp/actors/accessibility.md(iter-136, from prior source verification) — this PR is the first call site, not new spec research.live_143_native_a11y_tree.rs's three tests (live_a11y_source_meta,live_a11y_native_opt_in,live_a11y_service_restored) were run in this session against real headless Firefox (FF_RDP_LIVE_TESTS=1) and passed, exercisingenable/disableend-to-end. The manual dogfood run (ff-rdp a11y --native) also succeeded, returning{"source":"native","role":"document"}.oneway/release/bulkmarkers are involved — both methods are plain request/reply, matching the existingbootstrap()call already in this actor.Test plan
cargo fmt --all -- --checkcargo clippy --workspace --all-targets -- -D warningscargo test --workspace -q(full workspace, all green)FF_RDP_LIVE_TESTS=1live tests:live_143_native_a11y_tree::{live_a11y_source_meta,live_a11y_native_opt_in,live_a11y_service_restored}andlive_a11y_critical::a11y_critical_filters_to_violations— all pass against real headless FirefoxManual dogfood run of the plan's
dogfood_pathagainst real Firefox —meta.sourcecorrectly reports"js-fallback"by default and"native"/"document"under--nativecargo run -p xtask -- check-iteration-ready --plan kb/iterations/iteration-143-native-a11y-tree.md --base origin/main— 10/10 PASS## Claims vs code<generated 2026-08-12T06:00:11Z by ralph-loop>
an→ ✅ matched in diff