libservo: Set up graft node in AccessKit trees for webviews#43556
Merged
delan merged 2 commits intoservo:mainfrom Mar 26, 2026
Merged
libservo: Set up graft node in AccessKit trees for webviews#43556delan merged 2 commits intoservo:mainfrom
delan merged 2 commits intoservo:mainfrom
Conversation
mrobinson
approved these changes
Mar 23, 2026
Co-authored-by: delan azabani <[email protected]> Signed-off-by: Alice Boxhall <[email protected]>
3ee2c71 to
378707d
Compare
Co-authored-by: Alice Boxhall <[email protected]> Signed-off-by: delan azabani <[email protected]>
Member
|
@delan feel free to land this whenever you like. |
7 tasks
github-merge-queue bot
pushed a commit
that referenced
this pull request
Apr 1, 2026
this patch plumbs the webview accessibility trees (#43029, #43556) into servoshell. we add a global flag in servoshell, which is set when the platform activates accessibility and cleared when the platform deactivates accessibility. the flag in turn [activates accessibility](https://doc.servo.org/servo/struct.WebView.html#method.set_accessibility_active) in existing and new webviews. Testing: none in this patch, but will be covered by end-to-end platform a11y tests in WPT Fixes: part of #4344, extracted from our work in #42338 Signed-off-by: delan azabani <[email protected]> Co-authored-by: Luke Warlow <[email protected]> Co-authored-by: Alice Boxhall <[email protected]>
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.
in #43029, we defined an accessibility tree for each webview. we create those trees when accessibility is activated for that webview, then the embedder can graft it into their main accessibility tree. at the time, this accessibility tree was empty, but we ultimately want it to contain the accessibility tree of the documents loaded in the webview at any given time. to do that, we need to graft the active top-level pipeline’s accessibility tree into the webview accessibility tree. we should be able to ignore nested documents inside iframes here, and leave it to their parent documents to graft those in as part of layout accessibility.
this patch hooks into the moment in the constellation where we detect that the top-level document has changed (#43013), and notifies libservo of the new AccessKit TreeId for the webview-to-pipeline graft node. this moment covers navigating to a new top-level document and navigating back or forward, but not the initial document loaded in the webview, so we also hook into the moment a ConstellationWebView is created, and do the same for that initial document. now the accessibility tree for a webview with accessibility activated should look like this:
graft node for document back in historygraft node for document forward in historyTesting: this patch updates the relevant accessibility test in libservo
Fixes: part of #4344, extracted from our work in #42338