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

Issue 2684203002: MacViews/a11y: Allow accessibility clients to set new selections in Textfields. (Closed)

Created:
3 years, 10 months ago by Patti Lor
Modified:
3 years, 10 months ago
Reviewers:
tapted, nektarios, dmazzoni
CC:
aboxhall+watch_chromium.org, chrome-apps-syd-reviews_chromium.org, chromium-reviews, dmazzoni+watch_chromium.org, dtseng+watch_chromium.org, je_julie, mac-reviews_chromium.org, nektar+watch_chromium.org, tfarina, yuzo+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

MacViews/a11y: Allow accessibility clients to set new selections in Textfields. Currently, the `SelectedTextRange` a11y attribute on Views is reported as unmodifiable, which differs from native text field elements on Mac. This change will support allowing accessibility clients to change the text selection (including moving the cursor position) for views::Textfields. BUG=610591, 645596 TEST=With #secondary-ui-md turned on in chrome:flags, open the XCode Accessibility Inspector and bring up the HTTP Authentication dialog. Type some text into the username dialog, select some text, and inspect it with Alt+Space on macOS 10.12 or Cmd+F7 otherwise. In the Accessibility Inspector, scroll down to SelectedTextRange and check it's editable. Setting the location and length of the control then changes the text selection made earlier. Review-Url: https://codereview.chromium.org/2684203002 Cr-Commit-Position: refs/heads/master@{#451148} Committed: https://chromium.googlesource.com/chromium/src/+/0a8d26e24fbf3e0a262f2e0fe72100c979a77428

Patch Set 1 #

Patch Set 2 : Add tests. #

Total comments: 4

Patch Set 3 : Update to allow selection range changes when read-only. #

Total comments: 2

Patch Set 4 : Revert textfield.cc. #

Total comments: 2

Patch Set 5 : Update comment. #

Patch Set 6 : Rebase. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+51 lines, -18 lines) Patch
M ui/accessibility/platform/ax_platform_node_mac.mm View 1 2 3 4 5 7 chunks +26 lines, -18 lines 0 comments Download
M ui/views/widget/native_widget_mac_accessibility_unittest.mm View 1 2 3 4 5 1 chunk +25 lines, -0 lines 0 comments Download

Messages

Total messages: 48 (31 generated)
Patti Lor
Hi Trent, PTAL :)
3 years, 10 months ago (2017-02-09 22:51:40 UTC) #7
tapted
lgtm with the following https://codereview.chromium.org/2684203002/diff/20001/ui/accessibility/platform/ax_platform_node_mac.mm File ui/accessibility/platform/ax_platform_node_mac.mm (right): https://codereview.chromium.org/2684203002/diff/20001/ui/accessibility/platform/ax_platform_node_mac.mm#newcode436 ui/accessibility/platform/ax_platform_node_mac.mm:436: NSRange range = [value rangeValue]; ...
3 years, 10 months ago (2017-02-09 23:09:38 UTC) #8
nektarios
1. 1. + data.focus_offset I am about to send out a patch that takes the ...
3 years, 10 months ago (2017-02-09 23:17:57 UTC) #9
Patti Lor
Hi both, thanks for the reviews! @nektarios - I'm not sure what using setting the ...
3 years, 10 months ago (2017-02-13 23:31:03 UTC) #14
tapted
https://codereview.chromium.org/2684203002/diff/40001/ui/views/controls/textfield/textfield.cc File ui/views/controls/textfield/textfield.cc (right): https://codereview.chromium.org/2684203002/diff/40001/ui/views/controls/textfield/textfield.cc#newcode1418 ui/views/controls/textfield/textfield.cc:1418: if (!enabled() || !range.IsValid()) as discussed - I'm not ...
3 years, 10 months ago (2017-02-14 05:45:32 UTC) #15
Patti Lor
Thanks Trent, PTAL https://codereview.chromium.org/2684203002/diff/40001/ui/views/controls/textfield/textfield.cc File ui/views/controls/textfield/textfield.cc (right): https://codereview.chromium.org/2684203002/diff/40001/ui/views/controls/textfield/textfield.cc#newcode1418 ui/views/controls/textfield/textfield.cc:1418: if (!enabled() || !range.IsValid()) On 2017/02/14 ...
3 years, 10 months ago (2017-02-15 06:34:47 UTC) #20
Patti Lor
Thanks Trent, PTAL https://codereview.chromium.org/2684203002/diff/40001/ui/views/controls/textfield/textfield.cc File ui/views/controls/textfield/textfield.cc (right): https://codereview.chromium.org/2684203002/diff/40001/ui/views/controls/textfield/textfield.cc#newcode1418 ui/views/controls/textfield/textfield.cc:1418: if (!enabled() || !range.IsValid()) On 2017/02/14 ...
3 years, 10 months ago (2017-02-15 06:34:48 UTC) #21
Patti Lor
Thanks Trent, PTAL
3 years, 10 months ago (2017-02-15 06:34:48 UTC) #22
tapted
lgtm - thanks! https://codereview.chromium.org/2684203002/diff/60001/ui/views/widget/native_widget_mac_accessibility_unittest.mm File ui/views/widget/native_widget_mac_accessibility_unittest.mm (right): https://codereview.chromium.org/2684203002/diff/60001/ui/views/widget/native_widget_mac_accessibility_unittest.mm#newcode417 ui/views/widget/native_widget_mac_accessibility_unittest.mm:417: // a11y in non-editable, selectable NSTextfields. ...
3 years, 10 months ago (2017-02-15 22:31:52 UTC) #23
dmazzoni
lgtm
3 years, 10 months ago (2017-02-15 22:36:11 UTC) #25
nektarios
Sorry got caught up in other work. I'll add the anchor / focus node IDs ...
3 years, 10 months ago (2017-02-15 23:23:34 UTC) #28
nektarios
lgtm
3 years, 10 months ago (2017-02-15 23:23:49 UTC) #30
Patti Lor
@nektarios: No worries, thanks for that. Thanks all for the reviews! Updated the comment as ...
3 years, 10 months ago (2017-02-16 00:34:11 UTC) #31
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/2684203002/80001
3 years, 10 months ago (2017-02-16 01:54:25 UTC) #36
commit-bot: I haz the power
Failed to apply patch for ui/views/widget/native_widget_mac_accessibility_unittest.mm: While running git apply --index -p1; error: patch failed: ...
3 years, 10 months ago (2017-02-16 03:42:29 UTC) #38
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/2684203002/100001
3 years, 10 months ago (2017-02-16 23:06:54 UTC) #45
commit-bot: I haz the power
3 years, 10 months ago (2017-02-17 00:12:26 UTC) #48
Message was sent while issue was closed.
Committed patchset #6 (id:100001) as
https://chromium.googlesource.com/chromium/src/+/0a8d26e24fbf3e0a262f2e0fe721...

Powered by Google App Engine
This is Rietveld 408576698