Bug 269028 - AX: Input time element field labels and values are not spoken by VoiceOver.
Summary: AX: Input time element field labels and values are not spoken by VoiceOver.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Accessibility (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Andres Gonzalez
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2024-02-08 16:18 PST by Andres Gonzalez
Modified: 2024-02-25 17:07 PST (History)
14 users (show)

See Also:


Attachments
Patch (23.45 KB, patch)
2024-02-08 16:47 PST, Andres Gonzalez
no flags Details | Formatted Diff | Diff
Patch (23.57 KB, patch)
2024-02-09 05:37 PST, Andres Gonzalez
no flags Details | Formatted Diff | Diff
Patch (24.09 KB, patch)
2024-02-10 12:45 PST, Andres Gonzalez
no flags Details | Formatted Diff | Diff
Patch (27.65 KB, patch)
2024-02-19 18:25 PST, Andres Gonzalez
no flags Details | Formatted Diff | Diff
Patch (27.65 KB, patch)
2024-02-24 09:39 PST, Andres Gonzalez
no flags Details | Formatted Diff | Diff
Patch (28.31 KB, patch)
2024-02-25 09:08 PST, Andres Gonzalez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andres Gonzalez 2024-02-08 16:18:52 PST
.
Comment 1 Radar WebKit Bug Importer 2024-02-08 16:19:07 PST
<rdar://problem/122590568>
Comment 2 Andres Gonzalez 2024-02-08 16:47:51 PST
Created attachment 469783 [details]
Patch
Comment 3 Tyler Wilcock 2024-02-08 17:59:53 PST
Comment on attachment 469783 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=469783&action=review

> Source/WebCore/accessibility/AccessibilityRenderObject.cpp:794
> +        RefPtr input = dynamicDowncast<HTMLInputElement>(node());
> +        if (input)
> +            return input->visibleValue();

Can this be:

if (RefPtr input = dynamicDowncast<HTMLInputElement>(node()))
    return input->visibleValue();

I notice that we never update AXPropertyName::StringValue, and I'm wondering if we need to make sure to keep it up-to-date when HTMLInputElement::visibleValue() changes. Not sure if this is a problem in practice though?
Comment 4 Andres Gonzalez 2024-02-09 05:37:29 PST
Created attachment 469788 [details]
Patch
Comment 5 Andres Gonzalez 2024-02-09 05:49:36 PST
(In reply to Tyler Wilcock from comment #3)
> Comment on attachment 469783 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=469783&action=review
> 
> > Source/WebCore/accessibility/AccessibilityRenderObject.cpp:794
> > +        RefPtr input = dynamicDowncast<HTMLInputElement>(node());
> > +        if (input)
> > +            return input->visibleValue();
> 
> Can this be:
> 
> if (RefPtr input = dynamicDowncast<HTMLInputElement>(node()))
>     return input->visibleValue();

Fixed.

> 
> I notice that we never update AXPropertyName::StringValue, and I'm wondering
> if we need to make sure to keep it up-to-date when
> HTMLInputElement::visibleValue() changes. Not sure if this is a problem in
> practice though?

We do fire a number of AXValueChanged and in updateIsolatedTree we do

        case AXValueChanged:
            updateNode(notification.first);

We could probably be more surgical and try to update only the value related properties. In any case, it is not a problem for datetimes, either because we are getting an AXValueChanged or maybe a ChildrenChanged.
Comment 6 Andres Gonzalez 2024-02-10 12:45:45 PST
Created attachment 469807 [details]
Patch
Comment 7 chris fleizach 2024-02-12 11:07:40 PST
Comment on attachment 469807 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=469807&action=review

> COMMIT_MESSAGE:7
> +VoiceOver does not speak the value of <input type="time">, and does not announces the value of individual fields within the control when neigher a field is selected nor its value changed. This patch fixes these problem for numeric fields (derived from DateTimeNumericFieldElement) by providing appropriate labels for those fields and a role of SpinButton. In addition, AccessibilityRenderObject::stringValue now returns the correct value for all variants of date and time elements.

neigher -> spelling
Comment 8 Andres Gonzalez 2024-02-19 18:25:30 PST
Created attachment 469984 [details]
Patch
Comment 9 Andres Gonzalez 2024-02-24 09:39:11 PST
Created attachment 470040 [details]
Patch
Comment 10 Andres Gonzalez 2024-02-25 09:08:09 PST
Created attachment 470043 [details]
Patch

Update Monterey expectation.
Comment 11 EWS 2024-02-25 17:07:49 PST
Committed 275301@main (4a4b6fe780e4): <https://commits.webkit.org/275301@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 470043 [details].