Accessibility / Analysis / Voice Command Readiness
The Voice Command Readiness bookmarklet checks controls for unique and concise names suitable for voice control. Finds links, buttons, and inputs, extracts their accessible names (aria-label, aria-labelledby, visible text), normalizes names (lowercase, collapse whitespace, truncate to 60), identifies duplicate names used by multiple controls which would prevent voice targeting, and counts excessively long names (>6 words) which are harder to speak. Displays an alert with counts of duplicates and long names. Useful for testing voice control compatibility. 2.5.3: Label in Name, 4.1.2: Name, Role, Value.
WCAG SC 2.4.4: Link Purpose
Run Voice Command Readiness
Test run or drag to
bookmarklets bar to install
javascript:%21function()%7B%22use%20strict%22%3Btry%7Bfunction%20e(e)%7Bconst%20t%3De%3D%3Ee%26%26document.getElementById(e)%3F.innerText.trim()%3Bif(e.getAttribute(%22aria-label%22))return%20e.getAttribute(%22aria-label%22).trim()%3Bconst%20r%3De.getAttribute(%22aria-labelledby%22)%3Bif(r)return%20r.split(%2F%5Cs%2B%2F).map(t).filter(Boolean).join(%22%20%22).trim()%3Breturn(e.innerText%7C%7C%22%22).trim()%7C%7Ce.getAttribute(%22title%22)%7C%7C%22%22%7Dconst%20t%3D%5B...document.querySelectorAll(%27a%5Bhref%5D%2Cbutton%2C%5Brole%3D%22button%22%5D%2Cinput%2Cselect%2Ctextarea%27)%5D.filter(e%3D%3Ee.offsetParent)%2Cr%3Dt.map(t%3D%3Ee(t).toLowerCase().replace(%2F%5Cs%2B%2Fg%2C%22%20%22).trim()).map(e%3D%3Ee.slice(0%2C60))%2Cn%3Dnew%20Map%3Br.forEach((e%2Cr)%3D%3E%7Bif(%21e)return%3Bconst%20a%3Dn.get(e)%7C%7C%5B%5D%3Ba.push(t%5Br%5D)%2Cn.set(e%2Ca)%7D)%3Bconst%20a%3D%5B...n.entries()%5D.filter((%5Be%2Ct%5D)%3D%3Et.length%3E1%26%26e.length%3E0)%2Ci%3Dr.filter(e%3D%3Ee%26%26e.split(%22%20%22).length%3E6).length%3Balert(%60Duplicate%20names%3A%20%24%7Ba.length%7D%20%20Long%20names%3A%20%24%7Bi%7D%60)%2Cconsole.log(%22%5CnSource%3A%20https%3A%2F%2Fgithub.com%2Falejandrogiga98%2FA11y-Bookmarklets%5CnBookmarklet%20name%3A%20Voice%20command%20readiness%5CnAuthor%3A%20alejandrogiga98%5CnLicense%3A%20MIT%20License%5Cn%22)%7Dcatch(l)%7Balert(%22Bookmarklet%20Error%3A%20%22%2Bl.message)%7D%7D()%3B
← Back to all bookmarklets