-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
AX: Input time elements with no value are read incorrectly by VoiceOver.
https://bugs.webkit.org/show_bug.cgi?id=271394 <rdar://problem/125176285> Reviewed by Tyler Wilcock. The problem occurs because BaseDateAndTimeInputType::valueAsDouble returns NaN if the value attribute is not present. Thus, accessibilityValueAsDate was returning a bogus WallTime. This patch fixes the problem by getting the placeholder value set during the creation of the shadow subtree for the datetime element, which is the value shown on the screen. * LayoutTests/accessibility/datetime/input-time-label-value-expected.txt: * LayoutTests/accessibility/datetime/input-time-label-value.html: Added a test case with no value. * LayoutTests/platform/ios/accessibility/datetime/input-time-label-value-expected.txt: * LayoutTests/platform/mac-ventura/accessibility/datetime/input-time-label-value-expected.txt: * Source/WebCore/html/BaseDateAndTimeInputType.cpp: (WebCore::BaseDateAndTimeInputType::accessibilityValueAsDate const): (WebCore::BaseDateAndTimeInputType::setupDateTimeChooserParameters): * Source/WebCore/html/shadow/DateTimeEditElement.cpp: (WebCore::DateTimeEditElement::placeholderValue const): (WebCore::DateTimeEditElement::valueAsDateTimeFieldsState const): * Source/WebCore/html/shadow/DateTimeEditElement.h: * Source/WebCore/html/shadow/DateTimeFieldElement.h: * Source/WebCore/html/shadow/DateTimeFieldElements.cpp: (WebCore::DateTimeDayFieldElement::populateDateTimeFieldsState): (WebCore::DateTimeHourFieldElement::populateDateTimeFieldsState): (WebCore::DateTimeMeridiemFieldElement::populateDateTimeFieldsState): (WebCore::DateTimeMillisecondFieldElement::populateDateTimeFieldsState): (WebCore::DateTimeMinuteFieldElement::populateDateTimeFieldsState): (WebCore::DateTimeMonthFieldElement::populateDateTimeFieldsState): (WebCore::DateTimeSecondFieldElement::populateDateTimeFieldsState): (WebCore::DateTimeSymbolicMonthFieldElement::populateDateTimeFieldsState): (WebCore::DateTimeYearFieldElement::populateDateTimeFieldsState): Modified the populateDateTimeFieldsState method to return the placeholder value if the value has not been set. * Source/WebCore/html/shadow/DateTimeFieldElements.h: * Source/WebCore/html/shadow/DateTimeNumericFieldElement.cpp: (WebCore::DateTimeNumericFieldElement::DateTimeNumericFieldElement): (WebCore::DateTimeNumericFieldElement::valueAsInteger const): Inlined in header. * Source/WebCore/html/shadow/DateTimeNumericFieldElement.h: * Source/WebCore/html/shadow/DateTimeSymbolicFieldElement.cpp: (WebCore::DateTimeSymbolicFieldElement::valueAsInteger const): Inlined in header. * Source/WebCore/html/shadow/DateTimeSymbolicFieldElement.h: Canonical link: https://commits.webkit.org/276626@main
- Loading branch information
1 parent
5ce30e7
commit f2989cc
Showing
14 changed files
with
98 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.