[Webkit-unassigned] [Bug 160223] AX: Media controls accessibility improvement

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jul 27 07:04:11 PDT 2016


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

Eric Carlson <eric.carlson at apple.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #284671|review?                     |review-
              Flags|                            |

--- Comment #14 from Eric Carlson <eric.carlson at apple.com> ---
Comment on attachment 284671
  --> https://bugs.webkit.org/attachment.cgi?id=284671
patch

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

r- for now because of the hard coded timeline step value and the long/flaky test.

> Source/WebCore/Modules/mediacontrols/mediaControlsApple.js:424
> +        timeline.step = 1;

While 1 will be a better value than .01 for some movies, it will be much worse for very short files, and it still won't be great for long files. Can you set it to a percentage of the duration in updateDuration instead? You may want to vary the percentage based on duration, e.g. 1% of a 90 second file is almost a second but 1% of a 90 minute is almost a minute, but a I'll bet you can come up with reasonable values with some experimentation.

> Source/WebCore/Modules/mediacontrols/mediaControlsApple.js:1727
> +        this.controls.currentTime.setAttribute('aria-label', this.UIString('Elapsed') + ' ' + this.formatTime(currentTime));

Nit: A template literal could work well here:

this.controls.currentTime.setAttribute('aria-label', `${this.UIString('Elapsed')} ${this.formatTime(currentTime)}`);

> Source/WebCore/Modules/mediacontrols/mediaControlsApple.js:2104
> +        this.controls.volume.setAttribute('aria-valuetext', parseInt(this.controls.volume.value * 100) + '%');

Nit: A template literal could work well here:

this.controls.currentTime.setAttribute('aria-label', `${this.UIString('Remaining')} ${this.formatTime(timeRemaining)}`);

> LayoutTests/media/audio-controls-timeline-in-media-document.html:21
> +        setTimeout("testTimeLineValue()", 1000);

This test now takes a full second, which is a long time for a simple test like this. Additionally, the timeout is likely to make the test flaky. This won't be necessary if you don't always use a 1 second step value.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20160727/c6c9121e/attachment.html>


More information about the webkit-unassigned mailing list