Changeset 204361 in webkit
- Timestamp:
- Aug 10, 2016 4:30:24 PM (8 years ago)
- Location:
- trunk
- Files:
-
- 3 added
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r204358 r204361 1 2016-08-10 Nan Wang <n_wang@apple.com> 2 3 AX: Media controls timeline should have percentage value description 4 https://bugs.webkit.org/show_bug.cgi?id=160619 5 6 Reviewed by Eric Carlson. 7 8 * http/tests/media/hls/video-duration-accessibility-expected.txt: Added. 9 * http/tests/media/hls/video-duration-accessibility.html: Added. 10 * http/tests/media/resources/hls/generate-vod.php: Added. 11 * media/media-controls-accessibility-expected.txt: 12 * platform/efl/accessibility/media-element-expected.txt: 13 * platform/gtk/accessibility/media-element-expected.txt: 14 * platform/mac/accessibility/media-element-expected.txt: 15 1 16 2016-08-09 Skachkov Oleksandr <gskachkov@gmail.com> 2 17 -
trunk/LayoutTests/media/media-controls-accessibility-expected.txt
r203913 r204361 8 8 9 9 TEST COMPLETE 10 elapsedTimer.description: AXDescription: Elapsed 0 0:0011 remainingTimer.description: AXDescription: Remaining -00:0610 elapsedTimer.description: AXDescription: Elapsed 0 Seconds 11 remainingTimer.description: AXDescription: Remaining 6 Seconds 12 12 13 13 muteButton.description: AXDescription: Mute -
trunk/LayoutTests/platform/efl/accessibility/media-element-expected.txt
r203913 r204361 22 22 23 23 24 title: AXTitle: Elapsed 0 0:0024 title: AXTitle: Elapsed 0 Seconds 25 25 role: AXRole: AXTimer 26 26 … … 34 34 35 35 36 title: AXTitle: Remaining -00:0636 title: AXTitle: Remaining 6 Seconds 37 37 role: AXRole: AXTimer 38 38 -
trunk/LayoutTests/platform/gtk/accessibility/media-element-expected.txt
r203913 r204361 22 22 23 23 24 title: AXTitle: Remaining -00:0624 title: AXTitle: Remaining 6 Seconds 25 25 role: AXRole: AXTimer 26 26 -
trunk/LayoutTests/platform/mac/accessibility/media-element-expected.txt
r203913 r204361 35 35 36 36 37 description: AXDescription: Elapsed 0 0:0037 description: AXDescription: Elapsed 0 Seconds 38 38 role: AXRole: AXGroup 39 39 subrole: AXSubrole: AXApplicationTimer … … 56 56 57 57 58 description: AXDescription: Remaining -00:0658 description: AXDescription: Remaining 6 Seconds 59 59 role: AXRole: AXGroup 60 60 subrole: AXSubrole: AXApplicationTimer -
trunk/Source/WebCore/ChangeLog
r204359 r204361 1 2016-08-10 Nan Wang <n_wang@apple.com> 2 3 AX: Media controls timeline should have percentage value description 4 https://bugs.webkit.org/show_bug.cgi?id=160619 5 6 Reviewed by Eric Carlson. 7 8 Added aria-valuetext attribute to the timeline slider and set its value to 9 the percentage format. Also formatted the elapsed/remaining timer's description 10 so that it's more human readable. 11 12 Test: http/tests/media/hls/video-duration-accessibility.html 13 14 * English.lproj/mediaControlsLocalizedStrings.js: 15 * Modules/mediacontrols/mediaControlsApple.js: 16 (Controller.prototype.drawVolumeBackground): 17 (Controller.prototype.formatTimeDescription): 18 (Controller.prototype.formatTime): 19 (Controller.prototype.updateTime): 20 (Controller.prototype.updateControlsWhileScrubbing): 21 1 22 2016-08-10 Anders Carlsson <andersca@apple.com> 2 23 -
trunk/Source/WebCore/English.lproj/mediaControlsLocalizedStrings.js
r188182 r204361 18 18 'Exit Full Screen': 'Exit Full Screen', 19 19 'Fast Forward': 'Fast Forward', 20 'Hour' : 'Hour', 21 'Hours': 'Hours', 20 22 'Live Broadcast': 'Live Broadcast', 21 23 'Loading': 'Loading', 22 24 'Maximum Volume': 'Maximum Volume', 23 25 'Minimum Volume': 'Minimum Volume', 26 'Minute': 'Minute', 27 'Minutes': 'Minutes', 24 28 'Mute': 'Mute', 25 29 'Pause': 'Pause', … … 28 32 'Rewind': 'Rewind', 29 33 'Rewind ##sec## Seconds': 'Rewind ##sec## Seconds', 34 'Second': 'Second', 35 'Seconds': 'Seconds', 30 36 'Show Controls': 'Show Controls', 31 37 'Stalled': 'Stalled', -
trunk/Source/WebCore/Modules/mediacontrols/mediaControlsApple.js
r204088 r204361 1569 1569 ctx.restore(); 1570 1570 }, 1571 1572 formatTimeDescription: function(time) 1573 { 1574 if (isNaN(time)) 1575 time = 0; 1576 var absTime = Math.abs(time); 1577 var intSeconds = Math.floor(absTime % 60).toFixed(0); 1578 var intMinutes = Math.floor((absTime / 60) % 60).toFixed(0); 1579 var intHours = Math.floor(absTime / (60 * 60)).toFixed(0); 1580 1581 var secondString = intSeconds == 1 ? 'Second' : 'Seconds'; 1582 var minuteString = intMinutes == 1 ? 'Minute' : 'Minutes'; 1583 var hourString = intHours == 1 ? 'Hour' : 'Hours'; 1584 if (intHours > 0) 1585 return `${intHours} ${this.UIString(hourString)}, ${intMinutes} ${this.UIString(minuteString)}, ${intSeconds} ${this.UIString(secondString)}`; 1586 if (intMinutes > 0) 1587 return `${intMinutes} ${this.UIString(minuteString)}, ${intSeconds} ${this.UIString(secondString)}`; 1588 return `${intSeconds} ${this.UIString(secondString)}`; 1589 }, 1571 1590 1572 1591 formatTime: function(time) … … 1770 1789 var timeRemaining = currentTime - this.video.duration; 1771 1790 this.currentTimeClone.innerText = this.controls.currentTime.innerText = this.formatTime(currentTime); 1772 this.controls.currentTime.setAttribute('aria-label', `${this.UIString('Elapsed')} ${this.formatTime (currentTime)}`);1791 this.controls.currentTime.setAttribute('aria-label', `${this.UIString('Elapsed')} ${this.formatTimeDescription(currentTime)}`); 1773 1792 this.controls.timeline.value = this.video.currentTime; 1774 1793 this.remainingTimeClone.innerText = this.controls.remainingTime.innerText = this.formatTime(timeRemaining); 1775 this.controls.remainingTime.setAttribute('aria-label', `${this.UIString('Remaining')} ${this.formatTime(timeRemaining)}`); 1794 this.controls.remainingTime.setAttribute('aria-label', `${this.UIString('Remaining')} ${this.formatTimeDescription(timeRemaining)}`); 1795 1796 // Mark the timeline value in percentage format in accessibility. 1797 var timeElapsedPercent = currentTime / this.video.duration; 1798 timeElapsedPercent = Math.max(Math.min(1, timeElapsedPercent), 0); 1799 this.controls.timeline.setAttribute('aria-valuetext', `${parseInt(timeElapsedPercent * 100)}%`); 1776 1800 }, 1777 1801
Note: See TracChangeset
for help on using the changeset viewer.