• Resolved ryan232

    (@ryan232)


    I have a div element which is used to open / close the main menu on my site.

    The element’s ID is page-header-trigger

    When this plugin is installed, it sets the tabindex of this element to -1. Even though I have the element’s tabindex set to 0, it is overwritten.

    It appears as though the -1 tabindex stays there, regardless of whether I’ve got the “Remove tabindex from focusable elements” option checked or not.

    Any help would be appreciated in fixing this.

    Thanks!

    • This topic was modified 5 years, 6 months ago by ryan232.

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

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Joe Dolson

    (@joedolson)

    What plug-in is setting the tabindex of the trigger to -1? Unless you’ve assigned the div as the target of a skiplink, WP Accessibility shouldn’t be adding any tabindex values.

    The function to strip tabindex from elements, however, will not operate on a div, as that is *not* a focusable element.

    Your div has been made focusable using tabindex, but it’s still not natively focusable.

    Thread Starter ryan232

    (@ryan232)

    Hey Joe,

    Thanks for the clarification! I had set the div as a skiplink for the main menu and didn’t realize that set the div’s tabindex to -1.

    Additionally, I’ll be changing the page-header-trigger div to a button in order to be natively focusable.

    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Tabindex Affected (Even when option is disabled)’ is closed to new replies.