Revert "A11y:Expose labels of radio & checkbox when focused."
This reverts commit 9612f58a. Reason for revert: breaking linux-trusty-rel bot. Sample failure: https://ci.chromium.org/p/chromium/builders/ci/linux-trusty-rel/6828 https://logs.chromium.org/logs/chromium/buildbucket/cr-buildbucket.appspot.com/8891225736395206976/+/steps/content_browsertests_on_Ubuntu-14.04/0/logs/Deterministic_failure:_All__x2f_DumpAccessibilityTreeTest.AccessibilityInputRadioCheckboxLabel__x2f_linux__status_FAILURE_/0 [18791:18791:0114/205350.062302:INFO:dump_accessibility_test_helper.cc(98)] Expected output: /b/s/w/ir/content/test/data/accessibility/html/input-radio-checkbox-label-expected-auralinux.txt [18791:18791:0114/205350.062327:ERROR:dump_accessibility_test_helper.cc(126)] Diff: * Line Expected - ---- -------- 1 [document web] 2 ++[section] * 3 ++++[radio button] name='label ignored for radio button' checkable checkable:true * 4 ++++[check box] name='label ignored for checkbox' checkable checkable:true 5 ++++[label] name='label exposed for radio button ' label-for 6 ++++++[static] name='label exposed for radio button ' * 7 ++++++[radio button] name='label exposed for radio button' checkable labelled-by checkable:true 8 ++++++[static] name=' ' 9 ++++[label] name='label exposed for checkbox ' label-for 10 ++++++[static] name='label exposed for checkbox ' * 11 ++++++[check box] name='label exposed for checkbox' checkable labelled-by checkable:true 12 ++++++[static] name=' ' 13 <-- End-of-file --> Actual ------ [document web] ++[section] ++++[radio button] name='label ignored for radio button' checkable:true ++++[check box] name='label ignored for checkbox' checkable:true ++++[label] name='label exposed for radio button ' label-for ++++++[static] name='label exposed for radio button ' ++++++[radio button] name='label exposed for radio button' labelled-by checkable:true ++++++[static] name=' ' ++++[label] name='label exposed for checkbox ' label-for ++++++[static] name='label exposed for checkbox ' ++++++[check box] name='label exposed for checkbox' labelled-by checkable:true ++++++[static] name=' ' <-- End-of-file --> ../../content/browser/accessibility/dump_accessibility_browsertest_base.cc:442: Failure Value of: matches_expectation Actual: false Expected: true Original change's description: > A11y:Expose labels of radio & checkbox when focused. > > Currently, when a label is referenced by a control of type radio or > checkbox, we set the label as ignored in the AXTree thereby excluding > it from being perceived by ATs. > However, for the case when the control (radio/checkbox) is a > descendant of the label and label is focusable (tabindex="0") but > control is to be omitted from focus (tabindex="-1"), ATs perceive > neither the label nor the control when tabbing through the content: > > <label style="display:block" tabindex="0"> > radio button 1 > <input type="radio" id="radio1" tabindex="-1"> > </label> > > <label style="display:block" for="radio2" tabindex="0"> > radio button 2 > <input type="radio" id="radio2" tabindex="-1"> > </label> > > <label style="display:block" for="checkbox1" tabindex="0"> > checkbox 1 > <input type="checkbox" id="checkbox1" tabindex="-1"> > </label> > > <label style="display:block" for="checkbox2" tabindex="0"> > checkbox 2 > <input type="checkbox" id="checkbox2" tabindex="-1"> > </label> > > This change fixes the above scenario by exposing labels (referenced by > radio or checkbox) when they are focusable. For all other cases when > labels are referenced by radio or checkbox, we keep the existing > behavior of ignoring the label. > > Note: Neither Firefox nor Edge legacy hides a label from AT when the > label is referenced by a control. On Firefox and Edge legacy, label > content will be read twice (focus on label and focus on control > respectively). > WAI-ARIA spec does not specify label should be ignored when associated > with a radio/checkbox control. > > Bug: 1040210 > Change-Id: Ie7df5144dd2f0d285d97e6556adb46dcf2338f25 > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1992017 > Commit-Queue: Victor Fei <vicfei@microsoft.com> > Reviewed-by: Dominic Mazzoni <dmazzoni@chromium.org> > Cr-Commit-Position: refs/heads/master@{#731820} TBR=dmazzoni@chromium.org,chrishall@chromium.org,meredithl@chromium.org,kschmi@microsoft.com,iapres@microsoft.com,vicfei@microsoft.com Change-Id: I288116c0ed48350e8a7104c8fb698b4f3214e97b No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: 1040210 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2000728Reviewed-by:Marina Ciocea <marinaciocea@chromium.org> Commit-Queue: Marina Ciocea <marinaciocea@chromium.org> Cr-Commit-Position: refs/heads/master@{#731886}
Showing
Please register or sign in to comment