Bug 200169 - Expose the aria-label attribute for <video> elements.
Summary: Expose the aria-label attribute for <video> elements.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-07-26 11:36 PDT by Andres Gonzalez
Modified: 2019-07-29 10:25 PDT (History)
5 users (show)

See Also:


Attachments
Patch (7.64 KB, patch)
2019-07-26 11:45 PDT, Andres Gonzalez
no flags Details | Formatted Diff | Diff
Patch (7.71 KB, patch)
2019-07-26 13:27 PDT, 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 2019-07-26 11:36:57 PDT
Expose the aria-label attribute for <video> elements.
Comment 1 Andres Gonzalez 2019-07-26 11:45:16 PDT
Created attachment 374979 [details]
Patch
Comment 2 Andres Gonzalez 2019-07-26 11:57:56 PDT
<rdar://problem/51754558>
Comment 3 Darin Adler 2019-07-26 12:51:51 PDT
Comment on attachment 374979 [details]
Patch

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

Not sure I’m a qualified reviewer for this. But I do have some comments.

> Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:689
> +    // Convey the video object as interactive if it is not auto-playing.

This comment says "if it is not auto-playing" but that’s not what the code below does. The code checks if autoplay is allowed, not if it’s actually actively happening.

> Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:691
> +    auto* mediaObject = downcast<AccessibilityMediaObject>(m_object);
> +    return !mediaObject->isAutoplayEnabled();

Now that it gets this simple, we’d normally write it like this:

    return !downcast<AccessibilityMediaObject>(*m_object).isAutoplayEnabled();

I don’t think the two line version is better.
Comment 4 Andres Gonzalez 2019-07-26 13:27:23 PDT
Created attachment 374984 [details]
Patch
Comment 5 Andres Gonzalez 2019-07-26 13:30:52 PDT
(In reply to Darin Adler from comment #3)
> Comment on attachment 374979 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=374979&action=review
> 
> Not sure I’m a qualified reviewer for this. But I do have some comments.
> 
> > Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:689
> > +    // Convey the video object as interactive if it is not auto-playing.
> 
> This comment says "if it is not auto-playing" but that’s not what the code
> below does. The code checks if autoplay is allowed, not if it’s actually
> actively happening.
> 
> > Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:691
> > +    auto* mediaObject = downcast<AccessibilityMediaObject>(m_object);
> > +    return !mediaObject->isAutoplayEnabled();
> 
> Now that it gets this simple, we’d normally write it like this:
> 
>     return
> !downcast<AccessibilityMediaObject>(*m_object).isAutoplayEnabled();
> 
> I don’t think the two line version is better.

Thanks Darin, both good points. fixed.
Comment 6 WebKit Commit Bot 2019-07-27 17:42:42 PDT
Comment on attachment 374984 [details]
Patch

Clearing flags on attachment: 374984

Committed r247891: <https://trac.webkit.org/changeset/247891>
Comment 7 WebKit Commit Bot 2019-07-27 17:42:43 PDT
All reviewed patches have been landed.  Closing bug.
Comment 8 Russell Epstein 2019-07-29 10:25:44 PDT
(In reply to Andres Gonzalez from comment #5)
> (In reply to Darin Adler from comment #3)
> > Comment on attachment 374979 [details]
> > Patch
> > 
> > View in context:
> > https://bugs.webkit.org/attachment.cgi?id=374979&action=review
> > 
> > Not sure I’m a qualified reviewer for this. But I do have some comments.
> > 
> > > Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:689
> > > +    // Convey the video object as interactive if it is not auto-playing.
> > 
> > This comment says "if it is not auto-playing" but that’s not what the code
> > below does. The code checks if autoplay is allowed, not if it’s actually
> > actively happening.
> > 
> > > Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:691
> > > +    auto* mediaObject = downcast<AccessibilityMediaObject>(m_object);
> > > +    return !mediaObject->isAutoplayEnabled();
> > 
> > Now that it gets this simple, we’d normally write it like this:
> > 
> >     return
> > !downcast<AccessibilityMediaObject>(*m_object).isAutoplayEnabled();
> > 
> > I don’t think the two line version is better.
> 
> Thanks Darin, both good points. fixed.

It appears that this patch caused accessibility/ios-simulator/video-elements-ios.html to fail.

This was not caught by EWS because the test has a test expectation, [ Pass Timeout ].

 https://bugs.webkit.org/show_bug.cgi?id=200231