• Hello, I have the latest WordPress updated 6.1 and we are using the Accessible Web Helper tool with our account with Accessible Web, on our one site this is flagged to resolve.

    Elements should not have tabindex greater than zero
    SERIOUS · BEST PRACTICE
    Ensures tabindex attribute values are not greater than 0.

    Highlight All 1 Elements
    Highlight elementSkip to toolbar
    Skip to toolbar
    Failure Details
    Element has a tabindex greater than 0
    This is in the /wp-includes/class-wp-admin-bar.php
    Also, we have All page content should be contained by landmarks issues with Skip to toolbar and Log Out

    https://snipboard.io/XIoauq.jpg

    Any way to resolve this or is there a work around to get this resolved for WCAG compliant?

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Hello,

    Thank you for reaching out to us regarding your issue. It looks like this is related to the backend of the site, and the /wp-includes/class-wp-admin-bar.php file is a WordPress core file. After some research, the consensus I discovered is having a tab index greater than zero is allowed in HTML in spite of what the compliance tool says.

    Stackoverflow: “Elements should not have tabindex greater than zero” – Nonzero Tabindex Breaks Validation & 508 Compliance

    However, if you determined to correct it, here is a guide on how to fix the Elements should not have tabindex greater than zero problem.

    The main point of the article is:

    There are two main ways to avoid using tabindex with a value greater than 0. The first method is to change the tabindex to 0. Note that this may change the order in which the user tabs through the elements. The second method is to remove the tabindex entirely and modify the structure of the page so that a user tabbing through elements reach them in the order initially desired.
    
    A third method is to change the tabindex to tabindex="-1" and add Javascript. This removes the element from the tab order until you use Javascript changes the "-1" to a "0".

    The first two main ways are not ideal because the file is a core WordPress file. You may want to reach out to the WordPress Accessibility forum to see if there are any suggestions there.

    The third way requires JavaScript. I don’t advise JavaScript on the backend for this issue because it is for WordPress core, and it doesn’t appear to be a problem, as the consensus is that the tab index can be greater than 0.

Viewing 1 replies (of 1 total)
  • The topic ‘Skip to Toolbar and Log Out – WCAG issues’ is closed to new replies.