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

Issue 2518183002: Moved action verbs out of Blink. (Closed)

Created:
4 years, 1 month ago by nektarios
Modified:
4 years ago
CC:
aboxhall+watch_chromium.org, aboxhall, blink-reviews, blink-reviews-api_chromium.org, chromium-reviews, darin-cc_chromium.org, dglazkov+blink, dmazzoni+watch_chromium.org, dmazzoni, dtseng+watch_chromium.org, haraken, jam, je_julie, kinuko+watch, mlamouri+watch-content_chromium.org, nektar+watch_chromium.org, tfarina, yuzo+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Moved action verbs out of Blink. When Blink is asked to provide what actions an accessibility object supports, instead of returning a string with an action verb, it now returns a value from the |WebAXSupportedAction| enumeration. This change allows different platforms to localize the actions in any way they please. More specifically, on Windows we now expose two APIs: one for returning the localized action verb and one that returns the verb in English. This is a requirement dictated by the IAccessible2 Spec. BUG=640043 TESTED=By changing Chrome's language to something other than English and trying to read a clickable element with NVDA R=dmazzoni@chromium.org, sky@chromium.org, avi@chromium.org Committed: https://crrev.com/6e043304856897ee42289b94181baf34726f83c2 Cr-Commit-Position: refs/heads/master@{#438649}

Patch Set 1 #

Total comments: 4

Patch Set 2 : Fixed compilation error. #

Patch Set 3 : Fixed compilation error. #

Patch Set 4 : Removed some deps. #

Patch Set 5 : Changed GN dependencies for ui/accessibility. #

Total comments: 1

Patch Set 6 : Returns only "click" for the non-localized method that gets the action name on Windows. #

Total comments: 1

Patch Set 7 : Changed all action names to lower case. #

Patch Set 8 : Only enabled buttons should expose the press action. #

Total comments: 2

Patch Set 9 : Exposes appropriate state and action names when controls are disabled. #

Total comments: 2

Patch Set 10 : Prints out the action enum value to string. #

Patch Set 11 : Fixed compilation error. #

Patch Set 12 : Rebase with master. #

Patch Set 13 : Fixed get_actionName on Linux. #

Patch Set 14 : Fixed compilation error on Linux. #

Patch Set 15 : Moved |ActionToUnlocalizedString| to ui::AXTextUtils so that it can be used by both Linux ATK and W… #

Patch Set 16 : Exported function. #

Patch Set 17 : Used |ActionToUnlocalizedString| to print test output. #

Patch Set 18 : Fixed string16 to string8 issue. #

Patch Set 19 : Fixed Blink test. #

Patch Set 20 : Fixed test expectations. #

Patch Set 21 : Added activate action to text field. #

Total comments: 3

Patch Set 22 : Fixed long lines. #

Patch Set 23 : Added missing braces. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+312 lines, -121 lines) Patch
M chrome/browser/ui/views/toolbar/toolbar_button.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 2 chunks +4 lines, -4 lines 0 comments Download
M content/app/strings/content_strings.grd View 1 chunk +1 line, -25 lines 0 comments Download
M content/browser/accessibility/accessibility_tree_formatter_blink.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +0 lines, -3 lines 0 comments Download
M content/browser/accessibility/browser_accessibility.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +0 lines, -1 line 0 comments Download
M content/browser/accessibility/browser_accessibility_android.cc View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M content/browser/accessibility/browser_accessibility_auralinux.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +10 lines, -3 lines 0 comments Download
M content/browser/accessibility/browser_accessibility_win.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 6 chunks +35 lines, -9 lines 0 comments Download
M content/child/blink_platform_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 3 chunks +0 lines, -16 lines 0 comments Download
M content/renderer/accessibility/blink_ax_enum_conversion.h View 1 chunk +3 lines, -0 lines 0 comments Download
M content/renderer/accessibility/blink_ax_enum_conversion.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +26 lines, -0 lines 0 comments Download
M content/renderer/accessibility/blink_ax_tree_source.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +3 lines, -2 lines 0 comments Download
M content/test/data/accessibility/html/action-verbs-expected-blink.txt View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +12 lines, -12 lines 0 comments Download
M third_party/WebKit/Source/modules/accessibility/AXObject.h View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +13 lines, -1 line 0 comments Download
M third_party/WebKit/Source/modules/accessibility/AXObject.cpp View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +10 lines, -15 lines 0 comments Download
M third_party/WebKit/Source/web/AssertMatchingEnums.cpp View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +10 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/web/WebAXObject.cpp View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +3 lines, -3 lines 0 comments Download
M third_party/WebKit/public/platform/WebLocalizedString.h View 2 chunks +0 lines, -8 lines 0 comments Download
M third_party/WebKit/public/web/WebAXEnums.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +12 lines, -0 lines 0 comments Download
M third_party/WebKit/public/web/WebAXObject.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -2 lines 0 comments Download
M ui/accessibility/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +1 line, -0 lines 0 comments Download
M ui/accessibility/DEPS View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M ui/accessibility/ax_enums.idl View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 4 chunks +18 lines, -1 line 0 comments Download
M ui/accessibility/ax_node_data.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 4 chunks +13 lines, -7 lines 0 comments Download
M ui/accessibility/ax_text_utils.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +9 lines, -0 lines 0 comments Download
M ui/accessibility/ax_text_utils.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +55 lines, -0 lines 0 comments Download
M ui/accessibility/ax_tree_combiner.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -0 lines 0 comments Download
M ui/accessibility/platform/ax_platform_node_win.cc View 1 1 chunk +16 lines, -1 line 0 comments Download
M ui/strings/ui_strings.grd View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +26 lines, -3 lines 0 comments Download
M ui/views/controls/button/button.cc View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -0 lines 0 comments Download
M ui/views/controls/button/checkbox.cc View 1 2 3 4 5 6 7 8 1 chunk +9 lines, -0 lines 0 comments Download
M ui/views/controls/button/custom_button.cc View 1 2 3 4 5 6 7 8 1 chunk +4 lines, -0 lines 0 comments Download
M ui/views/controls/button/menu_button.cc View 1 2 3 4 5 6 7 8 3 chunks +4 lines, -4 lines 0 comments Download
M ui/views/controls/combobox/combobox.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +4 lines, -0 lines 0 comments Download
M ui/views/controls/textfield/textfield.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +4 lines, -0 lines 0 comments Download

Messages

Total messages: 128 (98 generated)
nektarios
4 years, 1 month ago (2016-11-22 00:33:53 UTC) #1
dmazzoni
https://codereview.chromium.org/2518183002/diff/1/content/browser/accessibility/browser_accessibility_win.cc File content/browser/accessibility/browser_accessibility_win.cc (right): https://codereview.chromium.org/2518183002/diff/1/content/browser/accessibility/browser_accessibility_win.cc#newcode2890 content/browser/accessibility/browser_accessibility_win.cc:2890: base::string16 action_verb = base::UTF8ToUTF16( I think I'd prefer if ...
4 years, 1 month ago (2016-11-22 01:01:09 UTC) #2
blink-reviews
All done, but I couldn't find a reference of the action names. Perhaps I should ...
4 years, 1 month ago (2016-11-23 05:06:49 UTC) #3
chromium-reviews
All done, but I couldn't find a reference of the action names. Perhaps I should ...
4 years, 1 month ago (2016-11-23 05:06:50 UTC) #4
nektarios
+sky for ui/views and chrome/browser/ui/views
4 years ago (2016-11-28 16:37:12 UTC) #13
dmazzoni
Try bots are all red, do you need to rebase?
4 years ago (2016-11-28 17:01:39 UTC) #16
dmazzoni
https://codereview.chromium.org/2518183002/diff/80001/content/browser/accessibility/browser_accessibility_win.cc File content/browser/accessibility/browser_accessibility_win.cc (right): https://codereview.chromium.org/2518183002/diff/80001/content/browser/accessibility/browser_accessibility_win.cc#newcode4067 content/browser/accessibility/browser_accessibility_win.cc:4067: return L"Click"; I think NVDA expected "click", lowercase. Most ...
4 years ago (2016-11-28 17:03:32 UTC) #19
sky
https://codereview.chromium.org/2518183002/diff/100001/ui/views/controls/button/menu_button.cc File ui/views/controls/button/menu_button.cc (right): https://codereview.chromium.org/2518183002/diff/100001/ui/views/controls/button/menu_button.cc#newcode301 ui/views/controls/button/menu_button.cc:301: node_data->AddIntAttribute(ui::AX_ATTR_ACTION, ui::AX_SUPPORTED_ACTION_PRESS); Does whether the button is enabled make ...
4 years ago (2016-11-28 18:18:01 UTC) #26
blink-reviews
On 11/28/2016 1:18 PM, sky@chromium.org wrote: > > https://codereview.chromium.org/2518183002/diff/100001/ui/views/controls/button/menu_button.cc > File ui/views/controls/button/menu_button.cc (right): > > ...
4 years ago (2016-11-28 21:51:56 UTC) #27
chromium-reviews
On 11/28/2016 1:18 PM, sky@chromium.org wrote: > > https://codereview.chromium.org/2518183002/diff/100001/ui/views/controls/button/menu_button.cc > File ui/views/controls/button/menu_button.cc (right): > > ...
4 years ago (2016-11-28 21:51:56 UTC) #28
sky
https://codereview.chromium.org/2518183002/diff/140001/ui/views/controls/button/checkbox.cc File ui/views/controls/button/checkbox.cc (right): https://codereview.chromium.org/2518183002/diff/140001/ui/views/controls/button/checkbox.cc#newcode128 ui/views/controls/button/checkbox.cc:128: node_data->AddIntAttribute(ui::AX_ATTR_ACTION, Shouldn't the check/uncheck only be added if enabled? ...
4 years ago (2016-11-28 22:32:00 UTC) #33
blink-reviews
On 11/28/2016 5:31 PM, sky@chromium.org wrote: > > https://codereview.chromium.org/2518183002/diff/140001/ui/views/controls/button/checkbox.cc > File ui/views/controls/button/checkbox.cc (right): > > ...
4 years ago (2016-11-28 23:02:51 UTC) #35
chromium-reviews
On 11/28/2016 5:31 PM, sky@chromium.org wrote: > > https://codereview.chromium.org/2518183002/diff/140001/ui/views/controls/button/checkbox.cc > File ui/views/controls/button/checkbox.cc (right): > > ...
4 years ago (2016-11-28 23:02:52 UTC) #36
sky
LGTM
4 years ago (2016-11-29 00:07:08 UTC) #40
dmazzoni
lgtm https://codereview.chromium.org/2518183002/diff/160001/content/browser/accessibility/browser_accessibility_win.cc File content/browser/accessibility/browser_accessibility_win.cc (right): https://codereview.chromium.org/2518183002/diff/160001/content/browser/accessibility/browser_accessibility_win.cc#newcode4060 content/browser/accessibility/browser_accessibility_win.cc:4060: case ui::AX_SUPPORTED_ACTION_NONE: This isn't a valid value, right? ...
4 years ago (2016-11-29 16:28:11 UTC) #41
chromium-reviews
On 11/29/2016 11:28 AM, dmazzoni@chromium.org wrote: > lgtm > > > > > https://codereview.chromium.org/2518183002/diff/160001/content/browser/accessibility/browser_accessibility_win.cc > ...
4 years ago (2016-11-29 21:22:15 UTC) #42
blink-reviews
On 11/29/2016 11:28 AM, dmazzoni@chromium.org wrote: > lgtm > > > > > https://codereview.chromium.org/2518183002/diff/160001/content/browser/accessibility/browser_accessibility_win.cc > ...
4 years ago (2016-11-29 21:22:15 UTC) #43
nektarios
It turns out that Linux ATK also had the same requirements, so I moved ActionToUnlocalizedName ...
4 years ago (2016-12-08 20:35:23 UTC) #63
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/2518183002/240001
4 years ago (2016-12-08 20:37:03 UTC) #66
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/321891)
4 years ago (2016-12-08 21:10:18 UTC) #68
nektarios
I need approval from owners to content/app and content/child.
4 years ago (2016-12-08 22:13:30 UTC) #71
Avi (use Gerrit)
lgtm stamp
4 years ago (2016-12-09 15:54:15 UTC) #72
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/2518183002/380001
4 years ago (2016-12-13 14:47:32 UTC) #103
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/355326)
4 years ago (2016-12-13 18:05:35 UTC) #105
dmazzoni
lgtm https://codereview.chromium.org/2518183002/diff/400001/ui/accessibility/ax_enums.idl File ui/accessibility/ax_enums.idl (right): https://codereview.chromium.org/2518183002/diff/400001/ui/accessibility/ax_enums.idl#newcode240 ui/accessibility/ax_enums.idl:240: // In contrast to |AXSupportedAction|, these describe what ...
4 years ago (2016-12-13 23:24:34 UTC) #108
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/2518183002/420001
4 years ago (2016-12-14 00:20:06 UTC) #114
commit-bot: I haz the power
Failed to apply patch for chrome/browser/ui/views/toolbar/toolbar_button.cc: While running git apply --index -p1; error: patch failed: ...
4 years ago (2016-12-14 03:04:59 UTC) #116
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/2518183002/440001
4 years ago (2016-12-14 20:09:33 UTC) #123
commit-bot: I haz the power
Committed patchset #23 (id:440001)
4 years ago (2016-12-14 22:22:35 UTC) #126
commit-bot: I haz the power
4 years ago (2016-12-14 22:25:04 UTC) #128
Message was sent while issue was closed.
Patchset 23 (id:??) landed as
https://crrev.com/6e043304856897ee42289b94181baf34726f83c2
Cr-Commit-Position: refs/heads/master@{#438649}

Powered by Google App Engine
This is Rietveld 408576698