Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 6c019d315e832ab46dd62cfa3fc7fb61720c2180
      
https://github.com/WebKit/WebKit/commit/6c019d315e832ab46dd62cfa3fc7fb61720c2180
  Author: Tyler Wilcock <[email protected]>
  Date:   2023-02-17 (Fri, 17 Feb 2023)

  Changed paths:
    M 
LayoutTests/accessibility/ios-simulator/accessibility-make-first-responder-expected.txt
    M 
LayoutTests/accessibility/ios-simulator/accessibility-make-first-responder.html
    M Source/WebCore/accessibility/AccessibilityObject.cpp

  Log Message:
  -----------
  WKWebView steals first responder when focused via VoiceOver
https://bugs.webkit.org/show_bug.cgi?id=249976
rdar://problem/103794378

Reviewed by Chris Fleizach.

This behavior was introduced in:

https://bugs.webkit.org/show_bug.cgi?id=234885 (AX: 
AccessibilityObject::setFocused(true) should make the webpage focused, and make 
web content the first responder)

To address an issue with Full Keyboard Access where focus rings weren't drawn 
in embedded WKWebViews.

However, after some manual testing, it seems that taking first-respondership is 
not necessary for drawing the focus rings, and it
seems like this behavior causes various adverse effects, such as:
  - VoiceOver Speak Screen focus erroneously jumping to the top of the page 
when encountering an embedded WKWebView
  - Third-party apps relying on WebKit to not steal first-respondership (see 
the comments in the bug associated with this patch)

This patch fixes the issue by removing the call to 
assistiveTechnologyMakeFirstResponser on iOS, effectively partially reverting 
the behavior introduced in 234885.

* 
LayoutTests/accessibility/ios-simulator/accessibility-make-first-responder.html:
Update the test to ensure focusing an AX object does not steal 
first-respondership.
* Source/WebCore/accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::setFocused):

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


_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to