[webkit-changes] [WebKit/WebKit] 71206d: AX: Standalone spin buttons should be directly inc...

Tyler Wilcock noreply at github.com
Wed Mar 8 19:37:27 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 71206def1a57ee6c5b8bad120a8cb2984269db78
      https://github.com/WebKit/WebKit/commit/71206def1a57ee6c5b8bad120a8cb2984269db78
  Author: Tyler Wilcock <tyler_w at apple.com>
  Date:   2023-03-08 (Wed, 08 Mar 2023)

  Changed paths:
    A LayoutTests/accessibility/mac/date-input-increment-decrement-expected.txt
    A LayoutTests/accessibility/mac/date-input-increment-decrement.html
    A LayoutTests/accessibility/mac/spinbutton-supported-attributes-expected.txt
    A LayoutTests/accessibility/mac/spinbutton-supported-attributes.html
    M LayoutTests/accessibility/spinbutton-increment-decrement.html
    M LayoutTests/platform/mac-wk1/TestExpectations
    A LayoutTests/platform/mac/accessibility/spinbutton-increment-decrement-expected.txt
    M Source/WebCore/accessibility/AccessibilityObjectInterface.h
    M Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm

  Log Message:
  -----------
  AX: Standalone spin buttons should be directly incrementable and decrementable
https://bugs.webkit.org/show_bug.cgi?id=253373
rdar://106224266

Reviewed by Andres Gonzalez.

Currently, every AccessibilityRole::SpinButton exposes the AXIncrementButton and AXDecrementButton
attributes, and does not expose the AXIncrement or AXDecrement actions.

This is fine for spinbuttons that do have associated increment and decrement controls (e.g. type="number" inputs),
but it is also valid for spinbuttons to be "standalone" -- i.e., have no associated increment or decrement controls.
And because these standalone spinbuttons don't expose the increment or decrement actions, and have no
increment or decrement buttons for ATs to use, they cannot be interacted with by ATs on macOS.

With this patch, we handle this distinction by introducing a SpinButtonType, and using that type to expose the correct
attributes and actions for each type of spin button.

This is impactful because our native type="date" inputs expose standalone spinbuttons for the month, day, and year fields.
Web authors can now also add key event listeners to their ARIA spinbuttons and receive simulated keypresses from AT users.

* LayoutTests/platform/mac-wk1/TestExpectations:
* LayoutTests/accessibility/mac/date-input-increment-decrement-expected.txt: Added.
* LayoutTests/accessibility/mac/date-input-increment-decrement.html: Added.
* LayoutTests/accessibility/mac/spinbutton-supported-attributes-expected.txt: Added.
* LayoutTests/accessibility/mac/spinbutton-supported-attributes.html: Added.
* LayoutTests/accessibility/spinbutton-increment-decrement-expected.txt:
* LayoutTests/accessibility/spinbutton-increment-decrement.html:
Ensure increment and decrement actions are supported on standalone ARIA spinbuttons.
* LayoutTests/platform/mac/accessibility/spinbutton-increment-decrement-expected.txt: Added.
* Source/WebCore/accessibility/AccessibilityObjectInterface.h:
(WebCore::AXCoreObject::spinButtonType):
* Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm:

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




More information about the webkit-changes mailing list