[webkit-changes] [WebKit/WebKit] 416062: AX: checkboxes don't respect `indeterminate` IDL a...

Tyler Wilcock noreply at github.com
Fri Dec 23 16:56:18 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 4160624d7f96c0c29e679b9d2670e37bd880323d
      https://github.com/WebKit/WebKit/commit/4160624d7f96c0c29e679b9d2670e37bd880323d
  Author: Tyler Wilcock <tyler_w at apple.com>
  Date:   2022-12-23 (Fri, 23 Dec 2022)

  Changed paths:
    M LayoutTests/accessibility/aria-checked-mixed-value-expected.txt
    M LayoutTests/accessibility/aria-checked-mixed-value.html
    M LayoutTests/accessibility/checkbox-mixed-value-expected.txt
    M LayoutTests/accessibility/checkbox-mixed-value.html
    M LayoutTests/platform/ios/TestExpectations
    A LayoutTests/platform/ios/accessibility/aria-checked-mixed-value-expected.txt
    R LayoutTests/platform/mac/accessibility/aria-checked-mixed-value-expected.txt
    M Source/WebCore/accessibility/AccessibilityNodeObject.cpp
    M Source/WebCore/accessibility/AccessibilityNodeObject.h
    M Source/WebCore/accessibility/AccessibilityObject.cpp
    M Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.cpp
    M Source/WebCore/html/HTMLInputElement.cpp
    M Tools/WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm

  Log Message:
  -----------
  AX: checkboxes don't respect `indeterminate` IDL attribute state
https://bugs.webkit.org/show_bug.cgi?id=231760
rdar://problem/84269311

Reviewed by Chris Fleizach.

This patch features two improvements:

  1. The `indeterminate` IDL attribute is respected when determining the
     AX value of native checkboxes
  2. Indeterminate values for both native inputs and aria-checked="mixed"
     ARIA inputs are now properly exposed on iOS

Prior to this patch, our determination of `isIndeterminate` was whether
the AX object had an `indeterminate="true"` HTML attribute. However,
this HTML attribute is non-standard and not used anywhere besides our AX
code. This patch removes usage of it in favor of the correct
indeterminate determination mechanisms.

* LayoutTests/accessibility/aria-checked-mixed-value.html:
Remove usage of `indeterminate` HTML attribute.
* LayoutTests/accessibility/checkbox-mixed-value-expected.txt:
* LayoutTests/accessibility/checkbox-mixed-value.html:
Remove usage of `indeterminate` HTML attribute in favor of
`indeterminate` IDL attribute.
* LayoutTests/platform/ios/TestExpectations:
Enable aria-checked-mixed-value.html and checkbox-mixed-value.html.

* LayoutTests/platform/ios/accessibility/aria-checked-mixed-value-expected.txt: Added.
* LayoutTests/platform/mac/accessibility/aria-checked-mixed-value-expected.txt: Deleted.
* LayoutTests/accessibility/aria-checked-mixed-value-expected.txt: Updated.
* Source/WebCore/accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::isIndeterminate const):
(WebCore::AccessibilityNodeObject::checkboxOrRadioValue const):
(WebCore::AccessibilityNodeObject::isNativeCheckboxOrRadio const): Deleted.
* Source/WebCore/accessibility/AccessibilityNodeObject.h:
* Source/WebCore/accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::checkboxOrRadioValue const):
* Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.cpp:
(WebCore::AXIsolatedTree::updateNodeProperties):
Fix AXTrace typo.
* Source/WebCore/html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::setIndeterminate):
Send a value change notification to update the accessibility isolated
tree cache, and to inform AX clients of the new value.
* Tools/WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm:
(WTR::AccessibilityUIElement::isIndeterminate const):
Implement using the existing WebAccessibilityObjectWrapperIOS::accessibilityIsIndeterminate method.

Canonical link: https://commits.webkit.org/258314@main




More information about the webkit-changes mailing list