WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
270243
AX: VoiceOver doesn't speak the value of the meridiem component in time controls.
https://bugs.webkit.org/show_bug.cgi?id=270243
Summary
AX: VoiceOver doesn't speak the value of the meridiem component in time contr...
Andres Gonzalez
Reported
2024-02-28 12:43:09 PST
.
Attachments
Patch
(1.55 KB, patch)
2024-02-28 12:49 PST
,
Andres Gonzalez
no flags
Details
Formatted Diff
Diff
Patch
(1.76 KB, patch)
2024-02-29 08:47 PST
,
Andres Gonzalez
no flags
Details
Formatted Diff
Diff
Patch
(3.61 KB, patch)
2024-03-12 18:28 PDT
,
Andres Gonzalez
no flags
Details
Formatted Diff
Diff
Patch
(3.98 KB, patch)
2024-03-13 07:35 PDT
,
Andres Gonzalez
tyler_w
: commit-queue-
Details
Formatted Diff
Diff
Patch
(10.82 KB, patch)
2024-03-13 21:36 PDT
,
Tyler Wilcock
no flags
Details
Formatted Diff
Diff
Patch
(11.23 KB, patch)
2024-03-13 22:25 PDT
,
Tyler Wilcock
no flags
Details
Formatted Diff
Diff
Show Obsolete
(4)
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2024-02-28 12:43:20 PST
<
rdar://problem/123781149
>
Andres Gonzalez
Comment 2
2024-02-28 12:49:55 PST
Created
attachment 470088
[details]
Patch
Andres Gonzalez
Comment 3
2024-02-29 08:47:07 PST
Created
attachment 470097
[details]
Patch
Andres Gonzalez
Comment 4
2024-03-12 18:28:28 PDT
Created
attachment 470328
[details]
Patch
Tyler Wilcock
Comment 5
2024-03-12 18:46:21 PDT
Comment on
attachment 470328
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=470328&action=review
> Source/WebCore/accessibility/AccessibilityNodeObject.cpp:423 > + if (element->isInUserAgentShadowTree() && element->userAgentPart() == UserAgentParts::webkitDatetimeEditMeridiemField()) { > + // The meridiem field of a datetime control is currently exposed as a button in order for VO to announce its value correctly. > + // It cannot be a SpinButton like other datetime fields because it is not numeric, i.e., its values are textual. > + // FIXME: This should be changed to a meaningful role that better reflects the nature of this UI component, i.e., a spin button with textual values that can be set with up/down arrows or first character. > + return AccessibilityRole::Button; > + }
Would it work to call element->setAttribute("role", "button") in `DateTimeMeridiemFieldElement::create`? That way we wouldn't pay the cost for doing this check for every div on the page.
> Source/WebCore/html/shadow/DateTimeFieldElements.cpp:-149 > - element->setAttributeWithoutSynchronization(HTMLNames::aria_labelAttr, AtomString { AXTimeFieldMeridiemText() });
Is AXTimeFieldMeridiemText() unused after this patch?
Andres Gonzalez
Comment 6
2024-03-13 07:35:20 PDT
Created
attachment 470341
[details]
Patch
Andres Gonzalez
Comment 7
2024-03-13 07:43:36 PDT
(In reply to Tyler Wilcock from
comment #5
)
> Comment on
attachment 470328
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=470328&action=review
> > > Source/WebCore/accessibility/AccessibilityNodeObject.cpp:423 > > + if (element->isInUserAgentShadowTree() && element->userAgentPart() == UserAgentParts::webkitDatetimeEditMeridiemField()) { > > + // The meridiem field of a datetime control is currently exposed as a button in order for VO to announce its value correctly. > > + // It cannot be a SpinButton like other datetime fields because it is not numeric, i.e., its values are textual. > > + // FIXME: This should be changed to a meaningful role that better reflects the nature of this UI component, i.e., a spin button with textual values that can be set with up/down arrows or first character. > > + return AccessibilityRole::Button; > > + } > > Would it work to call element->setAttribute("role", "button") in > `DateTimeMeridiemFieldElement::create`? That way we wouldn't pay the cost > for doing this check for every div on the page.
I went back and forth between these two changes, and the main reason to go this way was not to be dependent on ARIA roles. Nevertheless, since this is a temporary fix in my view, I went back to specifying the role via the HTML role attribute in the last revision.
> > > Source/WebCore/html/shadow/DateTimeFieldElements.cpp:-149 > > - element->setAttributeWithoutSynchronization(HTMLNames::aria_labelAttr, AtomString { AXTimeFieldMeridiemText() }); > > Is AXTimeFieldMeridiemText() unused after this patch?
Fixed. We should do a deeper cleanup of these cause I think there is plenty of unused ones.
Tyler Wilcock
Comment 8
2024-03-13 15:33:15 PDT
Comment on
attachment 470341
[details]
Patch Sorry, I didn't r+ this, was hoping to discuss more. I still don't understand why this div needs any role for the text within to be readable by VoiceOver. Also, won't VoiceOver read this as a button now, which might be confusing since I assume it doesn't actually act like a button?
Andres Gonzalez
Comment 9
2024-03-13 16:17:57 PDT
(In reply to Tyler Wilcock from
comment #8
)
> Comment on
attachment 470341
[details]
> Patch > > Sorry, I didn't r+ this, was hoping to discuss more. I still don't > understand why this div needs any role for the text within to be readable by > VoiceOver. Also, won't VoiceOver read this as a button now, which might be > confusing since I assume it doesn't actually act like a button?
If we don't set a role, VO will announce it as a group. Button is the best tradeoff with existing roles. We will need to add a new role or extend spin button to handle non-numeric values. I don't think that is in the scope of this change, we should do that as a separate patch.
Tyler Wilcock
Comment 10
2024-03-13 21:36:25 PDT
Created
attachment 470360
[details]
Patch
Tyler Wilcock
Comment 11
2024-03-13 22:25:20 PDT
Created
attachment 470361
[details]
Patch
EWS
Comment 12
2024-03-15 13:22:21 PDT
Committed
276195@main
(bc6637d9eddb): <
https://commits.webkit.org/276195@main
> All reviewed patches have been landed. Closing bug and clearing flags on
attachment 470361
[details]
.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug