fix: aria-label and aria-live on voice note elements
This commit is contained in:
parent
66fe5b5c16
commit
ca6b7e2803
1 changed files with 1 additions and 1 deletions
|
|
@ -142,7 +142,7 @@ pub fn render_form(config: &Config) -> String {
|
||||||
a.textContent='stop recording';
|
a.textContent='stop recording';
|
||||||
a.addEventListener('click',function(e){{e.preventDefault();rec.stop();rec.stream.getTracks().forEach(function(t){{t.stop()}})}});
|
a.addEventListener('click',function(e){{e.preventDefault();rec.stop();rec.stream.getTracks().forEach(function(t){{t.stop()}})}});
|
||||||
inl.appendChild(a);inl.appendChild(document.createTextNode(' '));
|
inl.appendChild(a);inl.appendChild(document.createTextNode(' '));
|
||||||
var t=document.createElement('span');t.className='guestbook-voice-timer';inl.appendChild(t);
|
var t=document.createElement('span');t.className='guestbook-voice-timer';t.setAttribute('aria-live','polite');t.setAttribute('aria-label','Recording timer');inl.appendChild(t);
|
||||||
st=Date.now();t.textContent=fmt(0)+' / '+fmt(maxDur);
|
st=Date.now();t.textContent=fmt(0)+' / '+fmt(maxDur);
|
||||||
iv=setInterval(function(){{
|
iv=setInterval(function(){{
|
||||||
var el=Math.floor((Date.now()-st)/1000);t.textContent=fmt(el)+' / '+fmt(maxDur);
|
var el=Math.floor((Date.now()-st)/1000);t.textContent=fmt(el)+' / '+fmt(maxDur);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue