Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: d652048f42c5d6b4da2b32f56f4228aae1d1f8a1
      
https://github.com/WebKit/WebKit/commit/d652048f42c5d6b4da2b32f56f4228aae1d1f8a1
  Author: Anne van Kesteren <[email protected]>
  Date:   2026-09-23 (Wed, 23 Sep 2026)

  Changed paths:
    A LayoutTests/fast/forms/select/option-accesskey-disabled-expected.txt
    A LayoutTests/fast/forms/select/option-accesskey-disabled.html
    M LayoutTests/platform/ios/TestExpectations
    M Source/WebCore/html/HTMLOptionElement.cpp

  Log Message:
  -----------
  An option should not be chosen by its access key when it is disabled
https://bugs.webkit.org/show_bug.cgi?id=324825

Reviewed by Ryosuke Niwa and Tim Nguyen.

HTMLElement::accessKeyAction() reaches the element through a simulated click, 
and
event dispatch suppresses that for a disabled element. HTMLOptionElement 
overrides it
and asks the select to change its selection directly, so nothing suppressed 
anything:
an access key chose the option whether the option, its optgroup, or the select 
was
disabled. There is no check at the call site either, 
EventHandler::handleAccessKey()
just calls accessKeyAction().

isActuallyDisabled() covers all three. Returning false rather than true leaves 
the
access key unhandled, as HTMLOptGroupElement::accessKeyAction() already does 
when it
declines.

Not a web-platform-test because access keys have no automated activation there, 
and
their modifier is platform dependent.

Test: fast/forms/select/option-accesskey-disabled.html
Canonical link: https://commits.webkit.org/321676@main



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

Reply via email to