Bug 105940 - AX: Chromium needs platform localized strings for media controls.
Summary: AX: Chromium needs platform localized strings for media controls.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Accessibility (show other bugs)
Version: 528+ (Nightly build)
Hardware: Other All
: P2 Normal
Assignee: David Tseng
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-01-02 13:29 PST by David Tseng
Modified: 2013-01-02 16:57 PST (History)
10 users (show)

See Also:


Attachments
Patch (8.46 KB, patch)
2013-01-02 13:44 PST, David Tseng
no flags Details | Formatted Diff | Diff
Patch (8.17 KB, patch)
2013-01-02 14:27 PST, David Tseng
no flags Details | Formatted Diff | Diff
Patch (8.41 KB, patch)
2013-01-02 15:50 PST, David Tseng
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description David Tseng 2013-01-02 13:29:44 PST
Chrome uses its own infrastructure to localize strings within webkit and these strings are not localized (or even exist) in Chrome. Thus this results in the following bug:
- play any mp3 file via a link in Chrome. (note must be Google Chrome).
- inspect any button with an a11y tool on your platform.

result:
no labels.

This hampers the usability of any media control and has been a source of many user complaints.
Comment 1 David Tseng 2013-01-02 13:44:49 PST
Created attachment 181057 [details]
Patch
Comment 2 WebKit Review Bot 2013-01-02 13:51:13 PST
Please wait for approval from abarth@webkit.org, dglazkov@chromium.org, fishd@chromium.org, jamesr@chromium.org or tkent@chromium.org before submitting, as this patch contains changes to the Chromium public API. See also https://trac.webkit.org/wiki/ChromiumWebKitAPI.
Comment 3 Tony Chang 2013-01-02 14:11:38 PST
Comment on attachment 181057 [details]
Patch

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

Seems fine, just fix the ChangeLog.

> Source/Platform/ChangeLog:1
> +2013-01-02  My Name  <my@email>

Please put your name and email here. I think you can set user.name and user.email in git to have this automatically filled in.

> Source/WebKit/chromium/ChangeLog:1
> +2013-01-02  My Name  <my@email>

Please put your name and email here.

> Source/WebKit/chromium/ChangeLog:18
> +2013-01-02  My Name  <my@email>
> +
> +        Need a short description (OOPS!).
> +        Need the bug URL (OOPS!).
> +
> +        Reviewed by NOBODY (OOPS!).

Looks like this got duplicated.
Comment 4 David Tseng 2013-01-02 14:27:03 PST
Created attachment 181067 [details]
Patch
Comment 5 Silvia Pfeiffer 2013-01-02 14:37:05 PST
FWIW: LGTM

Thanks for taking this on - it's been on my plate for a while, but I never got the chance to look at it. Seems simpler than I thought!
Comment 6 Tony Chang 2013-01-02 15:23:58 PST
Comment on attachment 181067 [details]
Patch

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

> Source/Platform/chromium/public/WebLocalizedString.h:55
> +        AXMediaDefault,
> +        AXMediaAudioElement,
> +        AXMediaVideoElement,
> +        AXMediaMuteButton,
> +        AXMediaUnMuteButton,
> +        AXMediaPlayButton,
> +        AXMediaPauseButton,

Please sort these.

> Source/WebKit/chromium/src/LocalizedStrings.cpp:462
> +
> +    return query(WebLocalizedString::AXMediaDefault);

Should we ASSERT_NOT_REACHED() here? That's what WebCore/platform/LocalizedStrings.cpp does.
Comment 7 David Tseng 2013-01-02 15:50:03 PST
Created attachment 181089 [details]
Patch
Comment 8 David Tseng 2013-01-02 15:56:10 PST
(In reply to comment #6)
> (From update of attachment 181067 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=181067&action=review
> 
> > Source/Platform/chromium/public/WebLocalizedString.h:55
> > +        AXMediaDefault,
> > +        AXMediaAudioElement,
> > +        AXMediaVideoElement,
> > +        AXMediaMuteButton,
> > +        AXMediaUnMuteButton,
> > +        AXMediaPlayButton,
> > +        AXMediaPauseButton,
> 
> Please sort these.

Done
> 
> > Source/WebKit/chromium/src/LocalizedStrings.cpp:462
> > +
> > +    return query(WebLocalizedString::AXMediaDefault);
> 
> Should we ASSERT_NOT_REACHED() here? That's what WebCore/platform/LocalizedStrings.cpp does.

Done (as well as for localizedHelpText); (I went as far as to include the specific check for the ControlsPanel, but not the exception for the enter full screen button help since it seems odd for webkit to make such a singular exception.
Comment 9 Tony Chang 2013-01-02 16:33:52 PST
Comment on attachment 181089 [details]
Patch

Note that the ews and commit queue bots don't run in debug so if the assert triggers, we probably won't see it until the patch lands.
Comment 10 WebKit Review Bot 2013-01-02 16:57:16 PST
Comment on attachment 181089 [details]
Patch

Clearing flags on attachment: 181089

Committed r138680: <http://trac.webkit.org/changeset/138680>
Comment 11 WebKit Review Bot 2013-01-02 16:57:21 PST
All reviewed patches have been landed.  Closing bug.