Buscador

miércoles, 11 de marzo de 2026

Analizar la accesibilidad de una página web con la consola de JavaScript

En Using the browser console for accessibility testing se explica cómo se puede usar la consola de JavaScript para analizar la accesibilidad de una página web.

Un ejemplo sencillo:
Here’s a simple script you can try first. It shows every link on the page as a NodeList in the console, which is useful for quick checks.

document.querySelectorAll("a");
Or you could highlight all links on the page:

document.querySelectorAll("a").forEach(a => a.style.outline = "2px solid red");
Some people turn snippets like these into bookmarklets (small saved JavaScript actions). That can be useful, but for teaching and quick testing, the console is often easier. I explain why at the end of the article.

No hay comentarios: