Tab order visualizer
Numbers every tabbable element by overlaying sequential numbers in visible badges on each one.
Code to copy
try {
const sel = 'a[href], button, input, select, textarea, [tabindex]';
let n = 0;
document.querySelectorAll(sel).forEach(function (el) {
if (el.disabled || el.tabIndex < 0) return;
n++;
const tag = document.createElement('span');
tag.textContent = n;
tag.style.cssText = 'position:absolute;z-index:99999;background:#9D0006;'
+ 'color:#fff;font:10px monospace;padding:1px 4px;border-radius:3px;';
const r = el.getBoundingClientRect();
tag.style.left = (r.left + window.scrollX) + 'px';
tag.style.top = (r.top + window.scrollY) + 'px';
document.body.appendChild(tag);
});
console.log('JustZix: ' + n + ' tabbable elements numbered');
} catch (err) { console.error('JustZix tab order:', err); }
How to use this example
- Copy the code with the button above.
- Install JustZix (2 minutes) and open the extension on the target page.
- Add a new rule matching that page.
- Paste the code into the rule's JavaScript panel and save — it runs on every page visit.
Rate this example
No ratings yet — be the first.