Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 997691b638cb8da31793e0f9f70ee43b8ea6bf49
      
https://github.com/WebKit/WebKit/commit/997691b638cb8da31793e0f9f70ee43b8ea6bf49
  Author: Joshua Hoffman <[email protected]>
  Date:   2025-11-10 (Mon, 10 Nov 2025)

  Changed paths:
    A LayoutTests/accessibility/ios-simulator/aria-notify-expected.txt
    A LayoutTests/accessibility/ios-simulator/aria-notify.html
    A LayoutTests/accessibility/mac/aria-notify-expected.txt
    A LayoutTests/accessibility/mac/aria-notify-with-options.html
    A LayoutTests/accessibility/mac/aria-notify.html
    M LayoutTests/platform/mac-wk1/TestExpectations
    A 
LayoutTests/platform/mac/accessibility/mac/aria-notify-with-options-expected.txt
    M LayoutTests/resources/accessibility-helper.js
    M Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml
    M Source/WebCore/CMakeLists.txt
    M Source/WebCore/DerivedSources-input.xcfilelist
    M Source/WebCore/DerivedSources-output.xcfilelist
    M Source/WebCore/DerivedSources.make
    M Source/WebCore/Sources.txt
    M Source/WebCore/SourcesCocoa.txt
    M Source/WebCore/WebCore.xcodeproj/project.pbxproj
    M Source/WebCore/accessibility/AXObjectCache.cpp
    M Source/WebCore/accessibility/AXObjectCache.h
    A Source/WebCore/accessibility/cocoa/AXObjectCacheCocoa.mm
    M Source/WebCore/accessibility/ios/AXObjectCacheIOS.mm
    M Source/WebCore/accessibility/isolatedtree/mac/AXIsolatedObjectMac.mm
    M Source/WebCore/accessibility/mac/AXObjectCacheMac.mm
    M Source/WebCore/accessibility/mac/CocoaAccessibilityConstants.h
    M Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperBase.mm
    A Source/WebCore/dom/AriaNotifyOptions.h
    A Source/WebCore/dom/AriaNotifyOptions.idl
    M Source/WebCore/dom/Document.cpp
    M Source/WebCore/dom/Document.h
    M Source/WebCore/dom/Document.idl
    M Source/WebCore/dom/Element.cpp
    M Source/WebCore/dom/Element.h
    M Source/WebCore/dom/Element.idl
    M Source/WebCore/loader/EmptyClients.h
    M Source/WebCore/page/Chrome.cpp
    M Source/WebCore/page/Chrome.h
    M Source/WebCore/page/ChromeClient.h
    M Source/WebKit/Scripts/webkit/messages.py
    M Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in
    M Source/WebKit/UIProcess/PageClient.h
    M Source/WebKit/UIProcess/WebPageProxy.h
    M Source/WebKit/UIProcess/WebPageProxy.messages.in
    M Source/WebKit/UIProcess/ios/PageClientImplIOS.h
    M Source/WebKit/UIProcess/ios/PageClientImplIOS.mm
    M Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm
    M Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.h
    M Source/WebKit/WebProcess/WebCoreSupport/ios/WebChromeClientIOS.mm
    M Source/WebKit/WebProcess/WebPage/WebPage.h
    M Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm
    M Source/WebKitLegacy/ios/WebCoreSupport/WebChromeClientIOS.h
    M Tools/WebKitTestRunner/InjectedBundle/cocoa/AccessibilityCommonCocoa.mm

  Log Message:
  -----------
  AX: Add initial ariaNotify implementation
https://bugs.webkit.org/show_bug.cgi?id=302136
rdar://164216162

Reviewed by Tyler Wilcock.

This adds initial support for the forthcoming ariaNotify spec on mac and iOS 
platforms.

On both platforms, this adds a new javascript interface to both Document and 
Element:
- ariaNotify("Message")
- ariaNotify("Message", { priority: "high", interrupt: "pending" })

The intent of these new functions is for web authors to send announcements to 
screen readers
with specified priority and interruption behavior.

To do this, when this method is called, we now send announcement requested 
notifications
on both platforms that include both the priority and interrupt behavior 
specified, alongside
the announcement's text and language.

On Mac, we directly send this from WebContent. On iOS, we forward this 
information to the
UI process which handles constructing and sending the notification to the 
system. This is
done via IPC and a new struct, which packages up the bits that we need to 
accurately
build the attributed string that the AX notification system will handle.

For testing purposes, we re-post this notification in a way that the tests can 
parse.

Three new tests (2 mac, 1 iOS) were added to exercise this behavior, and 
validate both the
document and element implementations.

Tests: accessibility/ios-simulator/aria-notify.html
       accessibility/mac/aria-notify-with-options.html
       accessibility/mac/aria-notify.html

* LayoutTests/accessibility/ios-simulator/aria-notify-expected.txt: Added.
* LayoutTests/accessibility/ios-simulator/aria-notify.html: Added.
* LayoutTests/accessibility/mac/aria-notify-expected.txt: Added.
* LayoutTests/accessibility/mac/aria-notify-with-options.html: Added.
* LayoutTests/accessibility/mac/aria-notify.html: Added.
* LayoutTests/platform/mac-wk1/TestExpectations:
* 
LayoutTests/platform/mac/accessibility/mac/aria-notify-with-options-expected.txt:
 Added.
* LayoutTests/resources/accessibility-helper.js:
* Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml:
* Source/WebCore/CMakeLists.txt:
* Source/WebCore/DerivedSources-input.xcfilelist:
* Source/WebCore/DerivedSources-output.xcfilelist:
* Source/WebCore/DerivedSources.make:
* Source/WebCore/Sources.txt:
* Source/WebCore/SourcesCocoa.txt:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::setShouldRepostNotificationsForTests):
(WebCore::AXObjectCache::postARIANotifyNotification):
(WebCore::AXObjectCache::handleAttributeChange):
* Source/WebCore/accessibility/AXObjectCache.h:
* Source/WebCore/accessibility/cocoa/AXObjectCacheCocoa.mm: Added.
(WebCore::notifyPriorityToAXValueString):
(WebCore::interruptBehaviorToAXValueString):
* Source/WebCore/accessibility/ios/AXObjectCacheIOS.mm:
(WebCore::AXObjectCache::postPlatformARIANotifyNotification):
* Source/WebCore/accessibility/isolatedtree/mac/AXIsolatedObjectMac.mm:
(WebCore::AXIsolatedObject::visibleCharacterRange const):
(WebCore::AXIsolatedObject::textMarkerRangeForNSRange const):
* Source/WebCore/accessibility/mac/AXObjectCacheMac.mm:
(WebCore::AXPostNotificationWithUserInfo):
(WebCore::AXObjectCache::postPlatformAnnouncementNotification):
(WebCore::AXObjectCache::postPlatformARIANotifyNotification):
(WebCore::AXObjectCache::platformHandleFocusedUIElementChanged):
(WebCore::AXObjectCache::setShouldRepostNotificationsForTests): Deleted.
* Source/WebCore/accessibility/mac/CocoaAccessibilityConstants.h:
* Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperBase.mm:
(+[WebAccessibilityObjectWrapperBase 
accessibilitySetShouldRepostNotifications:]):
(isValueTypeSupported):
* Source/WebCore/dom/AriaNotifyOptions.h: Added.
* Source/WebCore/dom/AriaNotifyOptions.idl: Added.
* Source/WebCore/dom/Document.cpp:
(WebCore::Document::ariaNotify):
* Source/WebCore/dom/Document.h:
* Source/WebCore/dom/Document.idl:
* Source/WebCore/dom/Element.cpp:
(WebCore::Element::ariaNotify):
* Source/WebCore/dom/Element.h:
* Source/WebCore/dom/Element.idl:
* Source/WebCore/loader/EmptyClients.h:
* Source/WebCore/page/Chrome.cpp:
(WebCore::Chrome::relayAriaNotifyNotification const):
* Source/WebCore/page/Chrome.h:
* Source/WebCore/page/ChromeClient.h:
* Source/WebKit/Scripts/webkit/messages.py:
(headers_for_type):
* Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in:
* Source/WebKit/UIProcess/PageClient.h:
* Source/WebKit/UIProcess/WebPageProxy.h:
* Source/WebKit/UIProcess/WebPageProxy.messages.in:
* Source/WebKit/UIProcess/ios/PageClientImplIOS.h:
* Source/WebKit/UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::relayAriaNotifyNotification):
* Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::relayAriaNotifyNotification):
* Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.h:
* Source/WebKit/WebProcess/WebCoreSupport/ios/WebChromeClientIOS.mm:
(WebKit::WebChromeClient::relayAriaNotifyNotification const):
* Source/WebKit/WebProcess/WebPage/WebPage.h:
* Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::relayAriaNotifyNotification):
* Source/WebKitLegacy/ios/WebCoreSupport/WebChromeClientIOS.h:
* Tools/WebKitTestRunner/InjectedBundle/cocoa/AccessibilityCommonCocoa.mm:
(WTR::makeValueRefForValue):

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to