fix: aria-label and aria-live on voice note elements

This commit is contained in:
Lewis Wynne 2026-04-10 16:13:30 +01:00
parent 66fe5b5c16
commit ca6b7e2803

View file

@ -142,7 +142,7 @@ pub fn render_form(config: &Config) -> String {
a.textContent='stop recording';
a.addEventListener('click',function(e){{e.preventDefault();rec.stop();rec.stream.getTracks().forEach(function(t){{t.stop()}})}});
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);
iv=setInterval(function(){{
var el=Math.floor((Date.now()-st)/1000);t.textContent=fmt(el)+' / '+fmt(maxDur);