[webkit-changes] [WebKit/WebKit] 137708: AX: VoiceOver reads erroneous value for datetime-l...

AndresGonzalezApple noreply at github.com
Fri Mar 1 05:21:06 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 1377080ff3c3e232ef4cae665dcad6819409f6c2
      https://github.com/WebKit/WebKit/commit/1377080ff3c3e232ef4cae665dcad6819409f6c2
  Author: Andres Gonzalez <andresg_22 at apple.com>
  Date:   2024-03-01 (Fri, 01 Mar 2024)

  Changed paths:
    A LayoutTests/accessibility/datetime/input-datetime-local-label-value-expected.txt
    A LayoutTests/accessibility/datetime/input-datetime-local-label-value.html
    M LayoutTests/platform/glib/TestExpectations
    A LayoutTests/platform/mac-monterey/accessibility/datetime/input-datetime-local-label-value-expected.txt
    M LayoutTests/platform/mac-wk1/TestExpectations
    M Source/WebCore/accessibility/AccessibilityNodeObject.cpp
    M Source/WebCore/html/BaseDateAndTimeInputType.cpp
    M Source/WebCore/html/BaseDateAndTimeInputType.h
    M Source/WebCore/html/HTMLInputElement.cpp
    M Source/WebCore/html/HTMLInputElement.h
    M Source/WebCore/html/InputType.cpp
    M Source/WebCore/html/InputType.h
    M Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp
    M Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h
    M Tools/WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl
    M Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm

  Log Message:
  -----------
  AX: VoiceOver reads erroneous value for datetime-local input elements.
https://bugs.webkit.org/show_bug.cgi?id=270276
<rdar://problem/123803281>

Reviewed by Tyler Wilcock.

AccessibilityNodeObject::dateTimeValue() relied on HTMLInputElement::valueAsDate(), that in turn forwards to an override of InputType::valueAsDate. The problem is that DateTimeLocalInputType::valueAsDate returns NaN unlike the overrides in the other subclasses of BaseDateAndTimeInputType. To solve this problem, we added the method accessibilityValueAsDate() that returns the right value for all BaseDateAndTimeInputType subclasses including DateTimeLocalInputType.
Added the AccessibilityUIElement::dateValue() method to the TestRunner to exercise this functionality. The new test does just that for datetime-local input elements.

* LayoutTests/accessibility/datetime/input-datetime-local-label-value-expected.txt: Added.
* LayoutTests/accessibility/datetime/input-datetime-local-label-value.html: Added.
* LayoutTests/platform/glib/TestExpectations:
* LayoutTests/platform/mac-monterey/accessibility/datetime/input-datetime-local-label-value-expected.txt: Added.
* LayoutTests/platform/mac-wk1/TestExpectations:
* Source/WebCore/accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::dateTimeValue const):
* Source/WebCore/html/BaseDateAndTimeInputType.cpp:
(WebCore::BaseDateAndTimeInputType::accessibilityValueAsDate const):
* Source/WebCore/html/BaseDateAndTimeInputType.h:
* Source/WebCore/html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::accessibilityValueAsDate const):
* Source/WebCore/html/HTMLInputElement.h:
* Source/WebCore/html/InputType.cpp:
(WebCore::InputType::accessibilityValueAsDate const):
* Source/WebCore/html/InputType.h:
* Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
* Tools/WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl:
* Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:
(WTR::AccessibilityUIElement::stringValue):
(WTR::AccessibilityUIElement::dateValue):

Canonical link: https://commits.webkit.org/275548@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