[webkit-changes] [WebKit/WebKit] e4365c: AX: cannot use accessibility to focus an element i...

Commit Queue noreply at github.com
Thu Dec 21 13:13:37 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: e4365c7e414c2afb383f8781eec2e15c9e8e6be2
      https://github.com/WebKit/WebKit/commit/e4365c7e414c2afb383f8781eec2e15c9e8e6be2
  Author: Dominic Mazzoni <dm_mazzoni at apple.com>
  Date:   2023-12-21 (Thu, 21 Dec 2023)

  Changed paths:
    A LayoutTests/http/tests/accessibility/focus-text-field-in-iframe-expected.txt
    A LayoutTests/http/tests/accessibility/focus-text-field-in-iframe.html
    A LayoutTests/http/tests/accessibility/resources/text-field-frame.html
    M LayoutTests/platform/glib/TestExpectations
    M Source/WebCore/accessibility/AccessibilityNodeObject.cpp

  Log Message:
  -----------
  AX: cannot use accessibility to focus an element in a cross-origin iframe
https://bugs.webkit.org/show_bug.cgi?id=266507
rdar://118405840

Reviewed by Tyler Wilcock.

If you use VoiceOver to navigate to a text field inside a cross-origin iframe, the field doesn't automatically get keyboard focus. The issue is that Element::focus checks whether the frame has had previous user interaction. To fix it, we can just mark the accessibility focus request as a user gesture.

The test needs to be in http/ because otherwise it's not possible to create a cross-origin iframe.

* LayoutTests/http/tests/accessibility/focus-text-field-in-iframe-expected.txt: Added.
* LayoutTests/http/tests/accessibility/focus-text-field-in-iframe.html: Added.
* LayoutTests/http/tests/accessibility/resources/text-field-frame.html: Added.
* LayoutTests/platform/glib/TestExpectations:
* Source/WebCore/accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::setFocused):

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




More information about the webkit-changes mailing list