Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(99)

Issue 2410333005: Create AXAction and AXActionData as a way to simplify accessibility actions (Closed)

Created:
4 years, 2 months ago by dmazzoni
Modified:
4 years, 2 months ago
Reviewers:
Tom Sepez, David Tseng, jam
CC:
chromium-reviews, extensions-reviews_chromium.org, sadrul, mlamouri+watch-content_chromium.org, aboxhall+watch_chromium.org, jam, creis+watch_chromium.org, nasko+codewatch_chromium.org, nektar+watch_chromium.org, yuzo+watch_chromium.org, je_julie, darin-cc_chromium.org, dmazzoni+watch_chromium.org, dtseng+watch_chromium.org, kalyank, chromium-apps-reviews_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Create AXAction and AXActionData as a way to simplify accessibility actions Previously we had a collection of 10 accessibility actions that were implemented on every accessibility object - all of them implemented for the web, and about half implemented for aura views and for the automation extension API. This resulted in a lot of boilerplate code because of the many layers of indirection between the various parts of the codebase. Adding a new accessibility action meant adding a new IPC and adding a new method to around a dozen files just to plumb it through. In comparison, we have dozens of accessibility events but we handle them all with a single flexible data structure, so adding a new event doesn't require so much plumbing. This change streamlines accessibility actions too. There's an enum AXAction with all of the possible accessibility actions, and a serializable data structure AXActionData that encapsulates the parameters needed by an accessibility action. This cuts down on some duplicate code and reduces the amount of new code that needs to be written to add support for a new accessibility action in the future. For example, macOS has "increment" and "decrement" actions for range controls that we ought to support, and there are some additional arguments to setAccessibilityFocus that we're contemplating. BUG=655272, 655273 TESTED=Manually triggered each of the supported accessibility actions from ChromeVox, and from at least one native screen reader. CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation Committed: https://crrev.com/daa9dd2ccf9e285d7dd9b389f663f5122506f1f3 Cr-Commit-Position: refs/heads/master@{#425980}

Patch Set 1 #

Patch Set 2 : Add dependency on ax_gen to fix compile error #

Patch Set 3 : Rebase #

Patch Set 4 : Fix compile error #

Patch Set 5 : Fix another dependency #

Patch Set 6 : Fix Android compile #

Total comments: 4

Patch Set 7 : Address feedback, add another public dep #

Patch Set 8 : Another dependency #

Patch Set 9 : Simplify dependencies by putting the action enum inside AXActionData #

Unified diffs Side-by-side diffs Delta from patch set Stats (+460 lines, -494 lines) Patch
M chrome/browser/extensions/api/automation_internal/automation_action_adapter.h View 1 2 3 4 5 6 7 8 1 chunk +7 lines, -19 lines 0 comments Download
M chrome/browser/extensions/api/automation_internal/automation_internal_api.cc View 1 2 3 4 5 6 7 8 3 chunks +24 lines, -28 lines 0 comments Download
M chrome/browser/ui/aura/accessibility/automation_manager_aura.h View 1 2 3 4 5 6 7 8 1 chunk +1 line, -8 lines 0 comments Download
M chrome/browser/ui/aura/accessibility/automation_manager_aura.cc View 1 2 3 4 5 6 7 8 2 chunks +38 lines, -27 lines 0 comments Download
M chrome/common/extensions/api/automation.idl View 1 chunk +14 lines, -0 lines 0 comments Download
M chrome/common/extensions/api/automation_internal.idl View 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/accessibility/android_granularity_movement_browsertest.cc View 1 chunk +1 line, -2 lines 0 comments Download
M content/browser/accessibility/browser_accessibility_cocoa.mm View 1 2 2 chunks +7 lines, -8 lines 0 comments Download
M content/browser/accessibility/browser_accessibility_manager.h View 1 2 3 4 5 6 7 8 4 chunks +13 lines, -18 lines 0 comments Download
M content/browser/accessibility/browser_accessibility_manager.cc View 1 2 3 4 5 6 7 8 4 chunks +93 lines, -22 lines 0 comments Download
M content/browser/accessibility/browser_accessibility_manager_android.cc View 1 2 3 4 5 2 chunks +2 lines, -6 lines 0 comments Download
M content/browser/accessibility/browser_accessibility_manager_unittest.cc View 1 2 3 4 5 6 7 8 1 chunk +1 line, -17 lines 0 comments Download
M content/browser/accessibility/dump_accessibility_events_browsertest.cc View 1 2 3 4 5 6 7 8 2 chunks +1 line, -2 lines 0 comments Download
M content/browser/accessibility/hit_testing_browsertest.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M content/browser/frame_host/render_frame_host_impl.h View 1 2 3 4 5 6 7 8 1 chunk +1 line, -17 lines 0 comments Download
M content/browser/frame_host/render_frame_host_impl.cc View 1 2 3 4 5 6 7 8 2 chunks +3 lines, -52 lines 0 comments Download
M content/common/accessibility_messages.h View 1 2 3 4 5 6 7 8 3 chunks +19 lines, -49 lines 0 comments Download
M content/public/browser/render_frame_host.h View 1 2 3 4 5 6 7 8 2 chunks +7 lines, -11 lines 0 comments Download
M content/renderer/accessibility/render_accessibility_impl.h View 1 2 3 4 5 6 7 8 2 chunks +7 lines, -13 lines 0 comments Download
M content/renderer/accessibility/render_accessibility_impl.cc View 1 2 3 4 5 6 7 8 5 chunks +60 lines, -193 lines 0 comments Download
M ui/accessibility/BUILD.gn View 1 chunk +2 lines, -0 lines 0 comments Download
M ui/accessibility/PRESUBMIT.py View 1 chunk +2 lines, -0 lines 0 comments Download
A ui/accessibility/ax_action_data.h View 1 2 3 4 5 6 7 8 1 chunk +60 lines, -0 lines 0 comments Download
A ui/accessibility/ax_action_data.cc View 1 2 3 4 5 6 7 8 1 chunk +62 lines, -0 lines 0 comments Download
M ui/accessibility/ax_enums.idl View 2 chunks +33 lines, -1 line 0 comments Download

Messages

Total messages: 54 (42 generated)
dmazzoni
David, please take a first look, then I'll get owners.
4 years, 2 months ago (2016-10-12 20:31:22 UTC) #4
David Tseng
lgtm https://codereview.chromium.org/2410333005/diff/100001/chrome/browser/ui/aura/accessibility/automation_manager_aura.cc File chrome/browser/ui/aura/accessibility/automation_manager_aura.cc (right): https://codereview.chromium.org/2410333005/diff/100001/chrome/browser/ui/aura/accessibility/automation_manager_aura.cc#newcode117 chrome/browser/ui/aura/accessibility/automation_manager_aura.cc:117: // Not implemented yet. NOTREACHED https://codereview.chromium.org/2410333005/diff/100001/chrome/browser/ui/aura/accessibility/automation_manager_aura.cc#newcode121 chrome/browser/ui/aura/accessibility/automation_manager_aura.cc:121: break; ...
4 years, 2 months ago (2016-10-13 22:15:14 UTC) #28
dmazzoni
https://codereview.chromium.org/2410333005/diff/100001/chrome/browser/ui/aura/accessibility/automation_manager_aura.cc File chrome/browser/ui/aura/accessibility/automation_manager_aura.cc (right): https://codereview.chromium.org/2410333005/diff/100001/chrome/browser/ui/aura/accessibility/automation_manager_aura.cc#newcode117 chrome/browser/ui/aura/accessibility/automation_manager_aura.cc:117: // Not implemented yet. On 2016/10/13 22:15:14, David Tseng ...
4 years, 2 months ago (2016-10-14 20:49:39 UTC) #29
dmazzoni
+tsepez for accessibility_messages.h +jam for content/public/browser/
4 years, 2 months ago (2016-10-17 17:08:37 UTC) #41
Tom Sepez
messages LGTM
4 years, 2 months ago (2016-10-17 18:13:35 UTC) #44
jam
lgtm
4 years, 2 months ago (2016-10-18 15:40:29 UTC) #45
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2410333005/160001
4 years, 2 months ago (2016-10-18 16:02:01 UTC) #48
commit-bot: I haz the power
Committed patchset #9 (id:160001)
4 years, 2 months ago (2016-10-18 16:07:26 UTC) #49
commit-bot: I haz the power
Patchset 9 (id:??) landed as https://crrev.com/daa9dd2ccf9e285d7dd9b389f663f5122506f1f3 Cr-Commit-Position: refs/heads/master@{#425980}
4 years, 2 months ago (2016-10-18 16:09:02 UTC) #51
Guido Urdaneta
A revert of this CL (patchset #9 id:160001) has been created in https://codereview.chromium.org/2430473003/ by guidou@chromium.org. ...
4 years, 2 months ago (2016-10-18 16:20:14 UTC) #52
findit-for-me
FYI: Findit identified this CL at revision 425980 as the culprit for failures in the ...
4 years, 2 months ago (2016-10-18 16:30:50 UTC) #53
huangs
4 years, 2 months ago (2016-10-18 16:43:16 UTC) #54
Message was sent while issue was closed.
The failed line

> 'content::BrowserAccessibilityDelegate'
>     node->manager()->delegate()->AccessibilityShowContextMenu(node->GetId());
>     ~~~~~~~~~~~~~~~~~~~~~~~~~~~  ^.

does not seem to appear in the CL??

Powered by Google App Engine
This is Rietveld 408576698