[webkit-changes] [WebKit/WebKit] ece8b0: AX: indeterminate progress elements are not report...

Tyler Wilcock noreply at github.com
Sun Dec 25 17:51:11 PST 2022


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

  Changed paths:
    A LayoutTests/accessibility/progress-indeterminate-value-expected.txt
    A LayoutTests/accessibility/progress-indeterminate-value.html
    M LayoutTests/platform/ios/TestExpectations
    M LayoutTests/platform/mac-wk1/TestExpectations
    M LayoutTests/platform/win/TestExpectations
    M Source/WebCore/accessibility/AccessibilityNodeObject.cpp
    M Source/WebCore/accessibility/AccessibilityObject.h
    M Source/WebCore/accessibility/AccessibilityObjectInterface.h
    M Source/WebCore/accessibility/AccessibilityProgressIndicator.cpp
    M Source/WebCore/accessibility/AccessibilityProgressIndicator.h
    M Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.cpp
    M Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.h
    M Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.h
    M Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm
    M Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm

  Log Message:
  -----------
  AX: indeterminate progress elements are not reported as indeterminate by VoiceOver
https://bugs.webkit.org/show_bug.cgi?id=249875
rdar://problem/103690774

Reviewed by Chris Fleizach.

This patch features two improvements:

  1. On both macOS and iOS, VoiceOver will now properly read
     indeterminate native `progress` elements as "indeterminate"
  2. On iOS, VoiceOver will now properly read indeterminate ARIA
    `role="progressbar"` elements as "indeterminate"

* LayoutTests/accessibility/progress-indeterminate-value-expected.txt: Added.
* LayoutTests/accessibility/progress-indeterminate-value.html: Added.
* LayoutTests/platform/ios/TestExpectations:
Enable new test.
* LayoutTests/platform/win/TestExpectations:
Disable new test.
* Source/WebCore/accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::isIndeterminate const):
Handle indeterminate role="progressbar" elements.
* Source/WebCore/accessibility/AccessibilityObject.h:
(WebCore::AccessibilityObject::hasARIAValueNow const):
Make non-virtual since AXIsolatedObjects have no use for this method.
* Source/WebCore/accessibility/AccessibilityObjectInterface.h:
* Source/WebCore/accessibility/AccessibilityProgressIndicator.cpp:
(WebCore::AccessibilityProgressIndicator::isIndeterminate const):
Added this override for `progress` elements without a `value` attribute.
* Source/WebCore/accessibility/AccessibilityProgressIndicator.h:
* Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.cpp:
(WebCore::AXIsolatedObject::initializeProperties):
* Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.h:
* Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.h:
Delete `AXPropertyName::HasARIAValueNow` and add
`AXPropertyName::IsIndeterminate` since usage of the former is replaced by
the latter in WebAccessibilityObjectWrapperMac.mm.
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
* Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
* Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:
(WTR::AccessibilityUIElement::isIndeterminate const):
Use `AXCoreObject::isIndeterminate` rather than checking for a integer
value of 2 (which is correct for indeterminate checkboxes but not
progress elements).

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




More information about the webkit-changes mailing list