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

Issue 2578303003: a11y: Add a11y information to views::Tab and manually ignore its a11y children. (Closed)

Created:
4 years ago by Patti Lor
Modified:
3 years, 11 months ago
Reviewers:
tapted, dmazzoni, sky
CC:
chromium-reviews, tfarina, chrome-apps-syd-reviews_chromium.org, sky
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

a11y: Add a11y information to views::Tab and manually ignore its a11y children. Currently, Views tabs have no a11y information specific to their class. The fallback then is to use the views::Label inside them for a11y information instead. This means they report their role as text. Fix this by adding a11y information to views::Tab to report its role as ui::AX_ROLE_TAB, and handle the ui::AX_ACTION_SET_SELECTED action and plumb through for Mac. views::Tab is also a special case where only the selected tab is allowed to be keyboard focusable. Because of this behavior, the views::Label inside is exposed to the accessibility tree. Since views::Tab now has its own a11y information, the views::Label should be hidden from users (see Issue 610589). Make a class views::TabLabel to manually set its a11y role to ui::AX_ROLE_IGNORED. BUG=657593, 610589 Review-Url: https://codereview.chromium.org/2578303003 Cr-Commit-Position: refs/heads/master@{#443837} Committed: https://chromium.googlesource.com/chromium/src/+/dc7d397153bcbccbc21e12f2ea3568f594699220

Patch Set 1 #

Patch Set 2 : Move a11y info to views::Tab instead of views::MdTab and manually ignore Label children. #

Patch Set 3 : Rebase back onto origin/master. #

Total comments: 7

Patch Set 4 : Mimic NSTabViewItem value behaviour and set NSAccessibilitySelectedAttribute (not yet user-writable… #

Patch Set 5 : Review comments allow writing tab selected state. #

Patch Set 6 : Typo #

Patch Set 7 : Fix DumpAccessibilityTreeTest.AccessibilityAriaTabPanel. #

Total comments: 24

Patch Set 8 : Review comments + move IDS_ACCNAME_TAB to ui/resources from chrome/app. #

Patch Set 9 : Cleanup. #

Patch Set 10 : Add tests. #

Total comments: 54

Patch Set 11 : Review comments. #

Total comments: 44

Patch Set 12 : Review comments. #

Total comments: 7

Patch Set 13 : Review comments. #

Total comments: 2

Patch Set 14 : Revert AXTab subrole. #

Patch Set 15 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+415 lines, -118 lines) Patch
M chrome/app/generated_resources.grd View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +0 lines, -5 lines 0 comments Download
M chrome/browser/ui/cocoa/tabs/tab_view.mm View 1 2 3 4 5 6 7 8 9 10 3 chunks +2 lines, -2 lines 0 comments Download
M ui/accessibility/platform/ax_platform_node_mac.mm View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 7 chunks +44 lines, -14 lines 0 comments Download
M ui/strings/ui_strings.grd View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +5 lines, -0 lines 0 comments Download
M ui/views/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -0 lines 0 comments Download
M ui/views/controls/tabbed_pane/tabbed_pane.h View 1 2 3 4 5 6 7 8 9 10 11 12 4 chunks +36 lines, -5 lines 0 comments Download
M ui/views/controls/tabbed_pane/tabbed_pane.cc View 1 2 3 4 5 6 7 8 9 10 11 6 chunks +44 lines, -35 lines 0 comments Download
A ui/views/controls/tabbed_pane/tabbed_pane_accessibility_mac_unittest.mm View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +164 lines, -0 lines 0 comments Download
M ui/views/controls/tabbed_pane/tabbed_pane_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +119 lines, -57 lines 0 comments Download

Messages

Total messages: 100 (84 generated)
Patti Lor
Hi Trent, PTAL. Combined with https://codereview.chromium.org/2119413004/ (Ignored a11y elements), it works (i.e., views::Label inside are ...
4 years ago (2016-12-22 00:20:31 UTC) #20
tapted
https://codereview.chromium.org/2578303003/diff/60001/ui/views/controls/tabbed_pane/tabbed_pane.cc File ui/views/controls/tabbed_pane/tabbed_pane.cc (right): https://codereview.chromium.org/2578303003/diff/60001/ui/views/controls/tabbed_pane/tabbed_pane.cc#newcode52 ui/views/controls/tabbed_pane/tabbed_pane.cc:52: class IgnoredLabel : public Label { On 2016/12/22 00:20:30, ...
4 years ago (2016-12-22 00:50:09 UTC) #21
Patti Lor
https://codereview.chromium.org/2578303003/diff/60001/ui/views/controls/tabbed_pane/tabbed_pane.cc File ui/views/controls/tabbed_pane/tabbed_pane.cc (right): https://codereview.chromium.org/2578303003/diff/60001/ui/views/controls/tabbed_pane/tabbed_pane.cc#newcode52 ui/views/controls/tabbed_pane/tabbed_pane.cc:52: class IgnoredLabel : public Label { On 2016/12/22 00:50:09, ...
3 years, 11 months ago (2016-12-30 00:35:02 UTC) #45
tapted
Can we add some tests? tabeed_pane_unittest.cc is probably the right place. Although we should have ...
3 years, 11 months ago (2017-01-03 00:29:27 UTC) #46
Patti Lor
Sorry for the wait, added some tests for this as suggested. PTAL, thank you! https://codereview.chromium.org/2578303003/diff/160001/ui/accessibility/BUILD.gn ...
3 years, 11 months ago (2017-01-06 02:02:30 UTC) #60
tapted
https://codereview.chromium.org/2578303003/diff/220001/ui/strings/ui_strings.grd File ui/strings/ui_strings.grd (right): https://codereview.chromium.org/2578303003/diff/220001/ui/strings/ui_strings.grd#newcode275 ui/strings/ui_strings.grd:275: <message name="IDS_ACCNAME_TAB" desc="A generic description of a tab button's ...
3 years, 11 months ago (2017-01-06 04:25:12 UTC) #61
Patti Lor
Thanks Trent, PTAL. https://codereview.chromium.org/2578303003/diff/220001/ui/strings/ui_strings.grd File ui/strings/ui_strings.grd (right): https://codereview.chromium.org/2578303003/diff/220001/ui/strings/ui_strings.grd#newcode275 ui/strings/ui_strings.grd:275: <message name="IDS_ACCNAME_TAB" desc="A generic description of ...
3 years, 11 months ago (2017-01-09 22:39:28 UTC) #66
tapted
https://codereview.chromium.org/2578303003/diff/240001/ui/accessibility/platform/ax_platform_node_mac.mm File ui/accessibility/platform/ax_platform_node_mac.mm (right): https://codereview.chromium.org/2578303003/diff/240001/ui/accessibility/platform/ax_platform_node_mac.mm#newcode416 ui/accessibility/platform/ax_platform_node_mac.mm:416: : data.action = ui::AX_ACTION_SET_VALUE; the single `=` doesn't look ...
3 years, 11 months ago (2017-01-10 16:22:19 UTC) #67
Patti Lor
https://codereview.chromium.org/2578303003/diff/240001/ui/accessibility/platform/ax_platform_node_mac.mm File ui/accessibility/platform/ax_platform_node_mac.mm (right): https://codereview.chromium.org/2578303003/diff/240001/ui/accessibility/platform/ax_platform_node_mac.mm#newcode416 ui/accessibility/platform/ax_platform_node_mac.mm:416: : data.action = ui::AX_ACTION_SET_VALUE; On 2017/01/10 16:22:18, tapted wrote: ...
3 years, 11 months ago (2017-01-11 05:51:45 UTC) #72
tapted
lgtm % nits; +sky, +dmazzoni sky: +cc for advice on moving the TabStrip declaration to ...
3 years, 11 months ago (2017-01-12 16:33:55 UTC) #74
sky
https://codereview.chromium.org/2578303003/diff/260001/ui/views/controls/tabbed_pane/tabbed_pane.h File ui/views/controls/tabbed_pane/tabbed_pane.h (left): https://codereview.chromium.org/2578303003/diff/260001/ui/views/controls/tabbed_pane/tabbed_pane.h#oldcode68 ui/views/controls/tabbed_pane/tabbed_pane.h:68: Tab* GetTabAt(int index); On 2017/01/12 16:33:55, tapted wrote: > ...
3 years, 11 months ago (2017-01-12 16:39:21 UTC) #76
Patti Lor
Thanks for the reviews! https://codereview.chromium.org/2578303003/diff/260001/ui/accessibility/platform/ax_platform_node_mac.mm File ui/accessibility/platform/ax_platform_node_mac.mm (right): https://codereview.chromium.org/2578303003/diff/260001/ui/accessibility/platform/ax_platform_node_mac.mm#newcode426 ui/accessibility/platform/ax_platform_node_mac.mm:426: if ([value isKindOfClass:[NSString class]]) { ...
3 years, 11 months ago (2017-01-13 05:48:38 UTC) #84
dmazzoni
lgtm https://codereview.chromium.org/2578303003/diff/300001/ui/accessibility/platform/ax_platform_node_mac.mm File ui/accessibility/platform/ax_platform_node_mac.mm (right): https://codereview.chromium.org/2578303003/diff/300001/ui/accessibility/platform/ax_platform_node_mac.mm#newcode189 ui/accessibility/platform/ax_platform_node_mac.mm:189: {ui::AX_ROLE_TAB, @"AXTab"}, Any documentation on this, or did ...
3 years, 11 months ago (2017-01-13 18:11:23 UTC) #85
Patti Lor
https://codereview.chromium.org/2578303003/diff/300001/ui/accessibility/platform/ax_platform_node_mac.mm File ui/accessibility/platform/ax_platform_node_mac.mm (right): https://codereview.chromium.org/2578303003/diff/300001/ui/accessibility/platform/ax_platform_node_mac.mm#newcode189 ui/accessibility/platform/ax_platform_node_mac.mm:189: {ui::AX_ROLE_TAB, @"AXTab"}, On 2017/01/13 18:11:23, dmazzoni wrote: > Any ...
3 years, 11 months ago (2017-01-16 02:59:50 UTC) #94
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/2578303003/340001
3 years, 11 months ago (2017-01-16 03:06:39 UTC) #97
commit-bot: I haz the power
3 years, 11 months ago (2017-01-16 03:11:22 UTC) #100
Message was sent while issue was closed.
Committed patchset #15 (id:340001) as
https://chromium.googlesource.com/chromium/src/+/dc7d397153bcbccbc21e12f2ea35...

Powered by Google App Engine
This is Rietveld 408576698