<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - AX: Media controls accessibility improvement"
href="https://bugs.webkit.org/show_bug.cgi?id=160223#c12">Comment # 12</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - AX: Media controls accessibility improvement"
href="https://bugs.webkit.org/show_bug.cgi?id=160223">bug 160223</a>
from <span class="vcard"><a class="email" href="mailto:eric.carlson@apple.com" title="Eric Carlson <eric.carlson@apple.com>"> <span class="fn">Eric Carlson</span></a>
</span></b>
<pre>Comment on <span class=""><a href="attachment.cgi?id=284667&action=diff" name="attach_284667" title="patch">attachment 284667</a> <a href="attachment.cgi?id=284667&action=edit" title="patch">[details]</a></span>
patch
View in context: <a href="https://bugs.webkit.org/attachment.cgi?id=284667&action=review">https://bugs.webkit.org/attachment.cgi?id=284667&action=review</a>
<span class="quote">> Source/WebCore/Modules/mediacontrols/mediaControlsApple.js:1182
> + if (this.video.muted) {
> + this.video.muted = false;
> + this.controls.muteButton.setAttribute('aria-checked', 'false');
> + }
> + this.video.volume = this.controls.volume.value;
> + this.controls.volume.setAttribute('aria-valuetext', parseInt(this.controls.volume.value * 100) + '%');</span >
It is unfortunate to have yet another function that checks/changes this.video.muted, sets this.video.volume, and sets the aria-valuetext. Can you make a helper function that does these common steps and call it from your new event handler and the existing event handler that have duplicate code?</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>