Quantcast
Channel: phpBB.com
Viewing all articles
Browse latest Browse all 2457

phpBB Ideas • Easy a11y improvement: use js to remove positive tabindex values

$
0
0
The short version is that phpBB is loaded with positive tabindex values by default,and they are notoriously bad for keyboard accessibility, while offering no advantage to other users.

This has been talked about before, but there's a quick and painless way of implementing it with minimal disruption.

Code:

//This gets rid of all default phpBB positive tabindex values.const tabPositives = document.querySelectorAll("[tabindex]");for (const tabPositive of tabPositives) {if (tabPositive.tabIndex > 0) {tabPositive.setAttribute('tabindex', '0');}}
No template hacking required. Just one little js snippet and it's all sorted (can be done in jQuery syntax if preferred).

Statistics: Posted by Gumboots — Mon Apr 07, 2025 9:59 pm



Viewing all articles
Browse latest Browse all 2457

Trending Articles