Skip to content

Commit

Permalink
Update accessibility related documentation to the mojo IPC
Browse files Browse the repository at this point in the history
Things have changed recently and we no longer use the legacy IPC
messages to communicate between the browser and the renderer, and
we even introduce a new class (RenderAccessibilityManager), so we
need to update the documentation to keep it being accurate.

Bug: 1010831
Change-Id: Ib41883f8356c2114d17e6b606989e9a54dd54d0d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2160468
Commit-Queue: Dominic Mazzoni <[email protected]>
Reviewed-by: Dominic Mazzoni <[email protected]>
Cr-Commit-Position: refs/heads/master@{#761469}
  • Loading branch information
mariospr authored and Commit Bot committed Apr 22, 2020
1 parent b1b6e03 commit 52f04e7
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions docs/accessibility/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -459,9 +459,9 @@ layer translates WebAXObjects into [AXContentNodeData], which is a subclass of
cross-platform accessibility tree. The translation is implemented in
[BlinkAXTreeSource]. This translation happens on the renderer side, so the
ui::AXNodeData tree now needs to be sent to the browser, which is done by
sending [AccessibilityHostMsg_EventParams] with the payload being serialized
delta-updates to the tree, so that changes that happen on the renderer side can
be reflected on the browser side.
calling the remote method [ax.mojom.RenderAccessibilityHost::HandleAXEvents()]
with the payload being serialized delta-updates to the tree, so that changes
that happen on the renderer side can be reflected on the browser side.

On the browser side, these IPCs are received by [RenderFrameHostImpl], and then
usually forwarded to [BrowserAccessibilityManager] which is responsible for:
Expand All @@ -477,8 +477,11 @@ usually forwarded to [BrowserAccessibilityManager] which is responsible for:
3. Dispatching incoming accessibility actions to the appropriate recipient, via
[BrowserAccessibilityDelegate]. For messages destined for a renderer,
[RenderFrameHostImpl], which is a BrowserAccessibilityDelegate, is
responsible for sending appropriate `AccessibilityMsg_Foo` IPCs to the
renderer, where they will be received by [RenderAccessibilityImpl].
responsible for calling the remote method
[ax.mojom.RenderAccessibility.PerformAction()], implemented by the renderer,
with the appropriate payload (of type [ax.mojom.AXActionData]). This IPC call
will be received by [RenderAccessibilityManager], which will then relay on
the [RenderAccessibilityImpl] where the actual logic is implemented.

On Chrome OS, RenderFrameHostImpl does not route events to
BrowserAccessibilityManager at all, since there is no platform screenreader
Expand Down Expand Up @@ -507,7 +510,9 @@ which is renderer-side code, and in JavaScript by the [automation API]. The API
is defined by [automation.idl], which must be kept synchronized with
[ax_enums.mojom].

[AccessibilityHostMsg_EventParams]: https://cs.chromium.org/chromium/src/content/common/accessibility_messages.h?sq=package:chromium&l=75
[ax.mojom.AXActionData]: https://source.chromium.org/chromium/chromium/src/+/master:ui/accessibility/mojom/ax_action_data.mojom;l=13
[ax.mojom.RenderAccessibilityHost::HandleAXEvents()]: https://source.chromium.org/chromium/chromium/src/+/master:content/common/render_accessibility.mojom;l=47
[ax.mojom.RenderAccessibility.PerformAction()]: https://source.chromium.org/chromium/chromium/src/+/master:content/common/render_accessibility.mojom;l=86
[AutomationInternalCustomBindings]: https://cs.chromium.org/chromium/src/extensions/renderer/api/automation/automation_internal_custom_bindings.h
[AXContentNodeData]: https://cs.chromium.org/chromium/src/content/common/ax_content_node_data.h
[AXLayoutObject]: https://cs.chromium.org/chromium/src/third_party/blink/renderer/modules/accessibility/ax_layout_object.h
Expand All @@ -525,6 +530,7 @@ is defined by [automation.idl], which must be kept synchronized with
[ViewAccessibility]: https://cs.chromium.org/chromium/src/ui/views/accessibility/view_accessibility.h
[Node]: https://cs.chromium.org/chromium/src/third_party/blink/renderer/core/dom/node.h
[RenderAccessibilityImpl]: https://cs.chromium.org/chromium/src/content/renderer/accessibility/render_accessibility_impl.h
[RenderAccessibilityManager]: https://source.chromium.org/chromium/chromium/src/+/master:content/renderer/accessibility/render_accessibility_manager.h
[RenderFrameHostImpl]: https://cs.chromium.org/chromium/src/content/browser/frame_host/render_frame_host_impl.h
[ui::AXNodeData]: https://cs.chromium.org/chromium/src/ui/accessibility/ax_node_data.h
[WebAXObject]: https://cs.chromium.org/chromium/src/third_party/blink/public/web/web_ax_object.h
Expand Down

0 comments on commit 52f04e7

Please sign in to comment.