Tabindex greater than zero -WordPress core issue-
-
Hi,
We are using the tool that checks the accessibility of our page. The tool is axe DevToolsThe tool shows that the Ensures tabindex attribute values are not greater than 0
This is the result of the test:
Element Location: a[href$=”#wp-toolbar”]To solve this problem, you need to fix the following:
Element has a tabindex grater than 0The button is used by users that navigates the page via keyboard. On Enter keydown,it takes the user to a specific navigation area, skipping other areas, to save time and effort. In the case of this button, it takes the user to the admin banner on the very top of the page.
The order the elements are hit when tabbing through the page, or tabindex, is generated automatically by the HTML code that creates the page, and is like the reading order, from beginning to end.
Since this button belongs to WordPress core and it’s located at the very end of the HTML document.The solution for this issue will be to change tabindex value from 1 to 0, but this will locate the button on its position on the HTML, which is almost at the end of the page. And this kind of “Skipping to navigation” buttons are supposed to be at the beginning. Also, this button is the only way to access via keyboard to the admin banner.
The real solution should be changing the order of the elements on the HTML code. But, since this is on the WordPress core, it’s a very complex task, that might not be even possible.
It would be great if you could fix this accessibility issue and check again using the tool to see if everything is right.
Thanks!
- The topic ‘Tabindex greater than zero -WordPress core issue-’ is closed to new replies.