• Resolved jomo5280

    (@jomo5280)


    I have an accessibility expert that is concerned that the role attribute is set to “navigation” on the skip link and should be removed.

    here is what it looks like:

    $('body').prepend('<div class="wpa-hide-ltr" id="skiplinks" role="navigation" aria-label="Skip links"><a href="#main-content">Skip to content</a> </div>'); $('#main-content').attr('tabindex','-1');

    Is that a valid concern? If so, is there a way to remove that attribute?

    • This topic was modified 4 years, 6 months ago by jomo5280.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Joe Dolson

    (@joedolson)

    Some people will be considered that it’s set, others will be concerned that it isn’t; so it readily goes either way.

    In neither case is it an accessibility problem; only a difference of opinion on what the optimal choice would be. The only difference is whether the skip link will be navigable within landmark regions by a screen reader; in this case, it will.

    This is not particularly necessary: there are other ways to get to the top of the page to find the skip link, should that be needed. But it also does not do significant harm.

    You could remove it either by editing the plug-in or by enqueuing custom JS that loaded after this did and removed the role.

    Thread Starter jomo5280

    (@jomo5280)

    Thank you for your response!
    This is proving to be a very “subjective” topic – and I agree with your talking points. Hopefully client can agree to disagree for the better good of the entire website’s purpose.

    Plugin Author Joe Dolson

    (@joedolson)

    Ultimately, I’d suggest that if you have a particular goal in mind, you should probably add skip links directly to your theme. Not having the skip link dependent on JavaScript would be better for your site, on the whole, and then you’d have complete control over it.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Skip Links Attributes’ is closed to new replies.