[webkit-changes] [WebKit/WebKit] 0b3aac: Post Accessibility notifications during compositio...

Jack Wiig noreply at github.com
Tue Jul 18 10:46:53 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 0b3aac159d97ed8ae6907c2bfa8db46120070feb
      https://github.com/WebKit/WebKit/commit/0b3aac159d97ed8ae6907c2bfa8db46120070feb
  Author: Jack Wiig <jhwiig at gmail.com>
  Date:   2023-07-18 (Tue, 18 Jul 2023)

  Changed paths:
    M LayoutTests/accessibility/mac/attributed-string/attributed-string-has-completion-annotation.html
    M LayoutTests/accessibility/mac/text-input-marked-range-expected.txt
    M LayoutTests/accessibility/mac/text-input-marked-range.html
    A LayoutTests/accessibility/mac/text-input-marked-text-marker-range-expected.txt
    A LayoutTests/accessibility/mac/text-input-marked-text-marker-range.html
    A LayoutTests/accessibility/mac/text-input-session-notifications-expected.txt
    A LayoutTests/accessibility/mac/text-input-session-notifications.html
    M LayoutTests/platform/mac/TestExpectations
    M Source/WebCore/accessibility/AXLogger.cpp
    M Source/WebCore/accessibility/AXObjectCache.cpp
    M Source/WebCore/accessibility/AXObjectCache.h
    M Source/WebCore/accessibility/AXTextMarker.cpp
    M Source/WebCore/accessibility/AXTextMarker.h
    M Source/WebCore/accessibility/AccessibilityObject.cpp
    M Source/WebCore/accessibility/AccessibilityObject.h
    M Source/WebCore/accessibility/AccessibilityObjectInterface.h
    M Source/WebCore/accessibility/cocoa/AXTextMarkerCocoa.mm
    M Source/WebCore/accessibility/cocoa/AccessibilityObjectCocoa.mm
    M Source/WebCore/accessibility/ios/AccessibilityObjectIOS.mm
    M Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.cpp
    M Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.h
    M Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.cpp
    M Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.h
    M Source/WebCore/accessibility/mac/AXObjectCacheMac.mm
    M Source/WebCore/accessibility/mac/AccessibilityObjectMac.mm
    M Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperBase.h
    M Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm
    M Source/WebCore/editing/Editor.cpp
    M Source/WebCore/editing/TypingCommand.cpp
    M Tools/DumpRenderTree/AccessibilityUIElement.cpp
    M Tools/DumpRenderTree/AccessibilityUIElement.h
    M Tools/DumpRenderTree/ios/AccessibilityUIElementIOS.mm
    M Tools/DumpRenderTree/mac/AccessibilityUIElementMac.mm
    M Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp
    M Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h
    M Tools/WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl
    M Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm

  Log Message:
  -----------
  Post Accessibility notifications during composition contexts indicating start, end, and value change.
https://bugs.webkit.org/show_bug.cgi?id=258228
rdar://problem/110925384

Reviewed by Andres Gonzalez.

To align ourselves with AppKit, WebKit should post a notification when a composition starts so that assistive technologies know to process any future value changes for that ui element as incomplete composition changes. When a composition ends, post a notification to indicate that the composition session has ended.

This model does not convey any information in the text notifications (unlike what my past comment indicates) and posts the notification from the text control containing the text information. This aligns us closer with how other UI frameworks behave.

Other changes:
- Added an AXTextMarkerRange variant to support the AXTextInputMarkedTextMarkerRange attribute
- Fixed the logic for adding composition attributes to an attributed string request

* LayoutTests/accessibility/mac/attributed-string/attributed-string-has-completion-annotation.html:
* LayoutTests/accessibility/mac/text-input-marked-range-expected.txt:
* LayoutTests/accessibility/mac/text-input-marked-range.html:
* LayoutTests/accessibility/mac/text-input-marked-text-marker-range-expected.txt: Added.
* LayoutTests/accessibility/mac/text-input-marked-text-marker-range.html: Added.
* LayoutTests/accessibility/mac/text-input-session-notifications-expected.txt: Added.
* LayoutTests/accessibility/mac/text-input-session-notifications.html: Added.
* Source/WebCore/accessibility/AXLogger.cpp:
(WebCore::operator<<):
* Source/WebCore/accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::onTextCompositionChange):
(WebCore::AXObjectCache::updateIsolatedTree):
(WebCore::AXObjectCache::textCompositionObjectForNode): Deleted.
* Source/WebCore/accessibility/AXObjectCache.h:
(WebCore::AXObjectCache::onTextCompositionChange):
(WebCore::AXObjectCache::updateRelations):
(WebCore::AXObjectCache::textCompositionObjectForNode): Deleted.
* Source/WebCore/accessibility/AXTextMarker.cpp:
(WebCore::AXTextMarkerRange::characterRange const):
(WebCore::AXIsolatedTextMarkerRange::AXIsolatedTextMarkerRange):
* Source/WebCore/accessibility/AXTextMarker.h:
* Source/WebCore/accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::textInputMarkedRange const):
(WebCore::AccessibilityObject::textInputMarkedTextMarkerRange const):
(WebCore::AccessibilityObject::isNodeForComposition const): Deleted.
* Source/WebCore/accessibility/AccessibilityObject.h:
* Source/WebCore/accessibility/AccessibilityObjectInterface.h:
* Source/WebCore/accessibility/cocoa/AXTextMarkerCocoa.mm:
(WebCore::AXTextMarkerRange::nsRange const):
* Source/WebCore/accessibility/cocoa/AccessibilityObjectCocoa.mm:
(WebCore::AccessibilityObject::contentForRange const):
* Source/WebCore/accessibility/ios/AccessibilityObjectIOS.mm:
(WebCore::attributedStringCreate):
* Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.cpp:
(WebCore::AXIsolatedObject::textInputMarkedRange const):
(WebCore::AXIsolatedObject::textInputMarkedTextMarkerRange const):
* Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.h:
* Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.cpp:
(WebCore::AXIsolatedTree::updateNodeProperties):
* Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.h:
* Source/WebCore/accessibility/mac/AXObjectCacheMac.mm:
(WebCore::AXObjectCache::postPlatformNotification):
* Source/WebCore/accessibility/mac/AccessibilityObjectMac.mm:
(WebCore::attributedStringSetCompositionAttributes):
(WebCore::attributedStringCreate):
* Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperBase.h:
* Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper ALLOW_DEPRECATED_IMPLEMENTATIONS_END]):
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
* Source/WebCore/editing/Editor.cpp:
(WebCore::Editor::setComposition):
* Source/WebCore/editing/TypingCommand.cpp:
(WebCore::TypingCommand::insertText):
* Tools/DumpRenderTree/AccessibilityUIElement.cpp:
(textInputMarkedTextMarkerRangeCallback):
(AccessibilityUIElement::textInputMarkedTextMarkerRange const):
(AccessibilityUIElement::getJSClass):
* Tools/DumpRenderTree/AccessibilityUIElement.h:
* Tools/DumpRenderTree/ios/AccessibilityUIElementIOS.mm:
(AccessibilityUIElement::textInputMarkedTextMarkerRange const):
* Tools/DumpRenderTree/mac/AccessibilityUIElementMac.mm:
(attributesOfElement):
(AccessibilityUIElement::textInputMarkedTextMarkerRange const):
* Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp:
(WTR::AccessibilityUIElement::textInputMarkedTextMarkerRange const):
* Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
* Tools/WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl:
* Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:
(WTR::AccessibilityUIElement::allAttributes):
(WTR::AccessibilityUIElement::textInputMarkedTextMarkerRange const):

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




More information about the webkit-changes mailing list