Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 37aef476e4a0e82eb10684e0fe0121415d40a3c7
https://github.com/WebKit/WebKit/commit/37aef476e4a0e82eb10684e0fe0121415d40a3c7
Author: Tyler Wilcock <[email protected]>
Date: 2025-04-10 (Thu, 10 Apr 2025)
Changed paths:
A LayoutTests/accessibility/mac/br-element-properties-expected.txt
A LayoutTests/accessibility/mac/br-element-properties.html
A LayoutTests/accessibility/mac/br-element-text-selection-expected.txt
A LayoutTests/accessibility/mac/br-element-text-selection.html
M LayoutTests/platform/mac-wk1/TestExpectations
M Source/WebCore/accessibility/AXObjectCache.cpp
M Source/WebCore/accessibility/cocoa/AXTextMarkerCocoa.mm
M Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.cpp
M
Source/WebCore/layout/integration/inline/LayoutIntegrationInlineContentPainter.cpp
M Source/WebCore/rendering/AccessibilityRegionContext.cpp
M Source/WebCore/rendering/AccessibilityRegionContext.h
Log Message:
-----------
AX: With ENABLE(AX_THREAD_TEXT_APIS), navigating by line to br elements no
longer results in any VoiceOver speech or VoiceOver cursor
https://bugs.webkit.org/show_bug.cgi?id=291340
rdar://148945209
Reviewed by Joshua Hoffman.
This commit fixes several bugs related to how we handle br elements, all
regressing as a result of ENABLE(AX_THREAD_TEXT_APIS).
- VoiceOver didn't speak anything when navigating to a br by line. This
happened because creating a text marker via
AXObjectCache::textMarkerDataForVisiblePosition early-exited for anything
that wasn't a RenderText or replaced element.
Fix this by handling br elements appropriately.
- VoiceOver didn't draw a cursor for br elements when navigating to them by
line. This was because we didn't cache
a relative frame for them, which in turn happened because they are skipped
by paint by default. Fix this by changing
InlineContentPainter::paintDisplayBox to paint brs for
PaintPhase::Accessibility, and add the appropriate handling
in AccessibilityRegionContext.
- VoiceOver read "dimmed" for br elements. This happened because we didn't
cache AXProperty::IsEnabled for ignored
objects. Thus when VoiceOver requested is-enabled, we returned the default
value of false. Fix this by caching
AXProperty::IsEnabled for all objects.
Also fix a crash in AXTextMarkerCocoa::toAttributedString where we tried to
append a nil attributed string. This fix is
covered by new test, accessibility/mac/br-element-text-selection.html.
* LayoutTests/accessibility/mac/br-element-properties-expected.txt: Added.
* LayoutTests/accessibility/mac/br-element-properties.html: Added.
* LayoutTests/accessibility/mac/br-element-text-selection-expected.txt: Added.
* LayoutTests/accessibility/mac/br-element-text-selection.html: Added.
* LayoutTests/platform/mac-wk1/TestExpectations: Skip new tests.
* Source/WebCore/accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::textMarkerDataForVisiblePosition):
* Source/WebCore/accessibility/cocoa/AXTextMarkerCocoa.mm:
(WebCore::AXTextMarkerRange::toAttributedString const):
* Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.cpp:
(WebCore::AXIsolatedObject::initializeProperties):
*
Source/WebCore/layout/integration/inline/LayoutIntegrationInlineContentPainter.cpp:
(WebCore::LayoutIntegration::InlineContentPainter::paintDisplayBox):
* Source/WebCore/rendering/AccessibilityRegionContext.cpp:
(WebCore::AccessibilityRegionContext::takeBounds):
* Source/WebCore/rendering/AccessibilityRegionContext.h:
Canonical link: https://commits.webkit.org/293518@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes