[webkit-changes] [WebKit/WebKit] e39892: Fix edge cases of keyboard navigations around `anc...

Commit Queue noreply at github.com
Tue Mar 12 05:48:33 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: e39892e12f8d3c3a544327c87c9904401e15ef9f
      https://github.com/WebKit/WebKit/commit/e39892e12f8d3c3a544327c87c9904401e15ef9f
  Author: Ahmad Saleem <ahmad.saleem792 at gmail.com>
  Date:   2024-03-12 (Tue, 12 Mar 2024)

  Changed paths:
    M LayoutTests/fast/events/anchor-empty-focus-expected.txt
    M LayoutTests/fast/events/anchor-empty-focus.html
    M LayoutTests/fast/events/frame-tab-focus-expected.txt
    M LayoutTests/fast/events/frame-tab-focus.html
    M LayoutTests/fast/events/tab-focus-anchor-expected.txt
    A LayoutTests/fast/events/tab-focus-anchor-tab-to-links-expected.txt
    A LayoutTests/fast/events/tab-focus-anchor-tab-to-links.html
    M LayoutTests/fast/events/tab-focus-anchor.html
    A LayoutTests/fast/forms/focus-on-control-with-zero-size-expected.txt
    A LayoutTests/fast/forms/focus-on-control-with-zero-size.html
    M LayoutTests/platform/ios/TestExpectations
    M Source/WebCore/html/HTMLAnchorElement.cpp

  Log Message:
  -----------
  Fix edge cases of keyboard navigations around `anchor` elements with `TabsToLink`

https://bugs.webkit.org/show_bug.cgi?id=270713

Reviewed by Ryosuke Niwa.

This patch is to fix edge cases in keyboard focus navigation around
`anchor` elements:

Partial Merge: https://chromium.googlesource.com/chromium/blink/+/53f8eba14b6362795bae47c02236ca93303264a6

By merging above, WebKit is trying to fix case around `empty anchor`
while `TabsToLinks` enabled. The test case was failing currently in
WebKit, so this fixes it.

Merge: https://chromium.googlesource.com/chromium/blink/+/7ef69ef071ba2b49ece747b93518b9a1218f9c45

In this merge, WebKit is aligning to allow keyboard navigation to anchors
with `TabsToLinks` being disabled if the anchors have explicit tabindex.

Beside following, this patch still retains `early return` if it is not focusable.

> Changes:
* Source/WebCore/html/HTMLAnchorElement.cpp:
(HTMLAnchorElement::isKeyboardFocusable):

> Test Cases & Expectations:
* LayoutTests/fast/events/anchor-empty-focus-expected.txt:
* LayoutTests/fast/events/anchor-empty-focus.html:
* LayoutTests/fast/events/frame-tab-focus-expected.txt:
* LayoutTests/fast/events/frame-tab-focus.html:
* LayoutTests/fast/events/tab-focus-anchor-expected.txt:
* LayoutTests/fast/events/tab-focus-anchor-tab-to-links-expected.txt:
* LayoutTests/fast/events/tab-focus-anchor-tab-to-links.html:
* LayoutTests/fast/events/tab-focus-anchor.html:
* LayoutTests/fast/forms/focus-on-control-with-zero-size.html:
* LayoutTests/fast/forms/focus-on-control-with-zero-size-expected.txt:

> Platform Specific Test Expectation:
* LayoutTests/platform/ios/TestExpectations: `iOS` don't have 'EventSender` keydown support

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



To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications


More information about the webkit-changes mailing list