Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 8c8a97961d8bdac770f70e168b00693feffccdc3
https://github.com/WebKit/WebKit/commit/8c8a97961d8bdac770f70e168b00693feffccdc3
Author: Joshua Hoffman <[email protected]>
Date: 2025-10-06 (Mon, 06 Oct 2025)
Changed paths:
A
LayoutTests/accessibility/ios-simulator/date-picker-focus-notification-expected.txt
A
LayoutTests/accessibility/ios-simulator/date-picker-focus-notification.html
M Source/WebCore/accessibility/AXObjectCache.cpp
M Source/WebCore/accessibility/AXObjectCache.h
M Source/WebCore/html/BaseDateAndTimeInputType.cpp
M Source/WebCore/page/Page.cpp
M Source/WebCore/page/Page.h
M Source/WebKit/WebProcess/WebPage/WebPage.h
M Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm
Log Message:
-----------
AX: [iOS] Date fields shouldn't send focused change notification when picker
popup is presented
https://bugs.webkit.org/show_bug.cgi?id=269269
rdar://122851275
Reviewed by Tyler Wilcock.
VoiceOver focus wasn't being moved to the date picker's popup due to a focused
element changed
notification fired on the date element as the picker was expanded. Native pop
up elements will
automatically post this notification in the UI process, so this notification
conflicted and
created a race condition.
To prevent this, there is a new flag in AXObjectCache that maintains the state
of the picker.
If the picker will open, this flag prevents us from sending the conflicting
notification. We
clear this state for new focus changes and when the picker is closed (sent via
IPC from the
UI process).
Date and DateTimeLocal input types were also added to elements that should
defer their focus
(shouldDeferFocusChange). This is because when this race condition occurs, the
focus event
happens prior to the DOMActivate event being dispatched, which prevents us from
knowing the
state of the picker before handling the notification. By deferring, we allow
the DOM event
to occur in time.
Test: accessibility/ios-simulator/date-picker-focus-notification.html
*
LayoutTests/accessibility/ios-simulator/date-picker-focus-notification-expected.txt:
Added.
* LayoutTests/accessibility/ios-simulator/date-picker-focus-notification.html:
Added.
* Source/WebCore/accessibility/AXObjectCache.cpp:
(WebCore::shouldDeferFocusChange):
(WebCore::AXObjectCache::handleFocusedUIElementChanged):
* Source/WebCore/accessibility/AXObjectCache.h:
* Source/WebCore/html/BaseDateAndTimeInputType.cpp:
(WebCore::BaseDateAndTimeInputType::showPicker):
* Source/WebCore/page/Page.cpp:
(WebCore::Page::clearIsShowingInputView):
* Source/WebCore/page/Page.h:
* Source/WebKit/WebProcess/WebPage/WebPage.h:
* Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::setIsShowingInputViewForFocusedElement):
Canonical link: https://commits.webkit.org/301057@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