Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1215272
    ehsd
    Participant

    I have activated WP Accessibility plugin to enable some missing accessibility features to X. One of the options is the ability to turn on skiplinks. For that option I need to enter the main content ID and main navigation ID. The main content and navigation divs don’t seem to use IDs and instead just use classes with ARIA roles. What file do I need to edit to add IDs to the main content and navigation divs?

    #1215651
    Lely
    Moderator

    Hi There,

    This will depend on which page you want to edit and which stack you’re using. For example, if you’re using integrity, we can find it here:\wp-content\themes\x\framework\views\integrity. It could be page template file or wp-index.php or wp-single.php. See attached screenshot. Copy this file on the same folder on your child theme and feel free to add those ID.

    Hope this helps.

    #1216292
    ehsd
    Participant

    Im using Integrity dark and this needs to be site-wide on all main page content and navigation divs. In case you are unfamiliar with skiplinks, they allow screen readers to skip past navigation links directly to the main content. Other wise, especially on large sites, the large number of links makes getting to the actual content cumbersome.
    Keeping Links Accessible
    Accessible HTML

    It looks like I may need to edit wp-header.php and maybe wp-page.php or wp-index.php?

    #1216700
    Nabeel A
    Moderator

    Hi again,

    You can add the ID’s using jQuery. Add the following jQuery script in your Customizer via Appearance > Customize > Custom > Edit Global Javascript

    jQuery(document).ready(function($){
    	$('.x-navbar-wrap').attr('id', 'navigation-id');
    	$('.x-main').attr('id', 'main-id');
    });

    Don’t forget to clear your browser’s cache after adding the code. Let us know how this goes!

    #1219498
    ehsd
    Participant

    Thanks, I’ll give that a try and report back.

    #1219563
    Thai
    Moderator

    Let us know how it goes!

  • <script> jQuery(function($){ $("#no-reply-1215272 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>