Support » Plugin: WP Accessibility » adding landmark role= to toolbar output

  • Resolved Steve



    Great plugin, thanks.

    My accessibility audits are failing because the toolbar the plugin creates isn’t contained in a landmark.

    Some page content is not contained by landmarks

    <button type="button" class="a11y-toggle-contrast toggle-contrast" id="is_normal_contrast" aria-pressed="false">

    Because the output is being generated by wp_head() it’s appearing right after the opening body tag, outside my theme’s defined landmark sections.

    Is there a way of adding a role= to the wrapping div for the toolbar? Or another mechanism for achieving compliance via the settings I’m missing?

    Thanks in advance.

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


    You can define a container to place the toolbar inside in the settings. “Toolbar location (ID attribute)”



    Thanks for getting back to me Joe.

    I was trying this with no luck but have just realised that you need to actually put the # as well as the container ID in that field for it to work (#wpa-wrap not just wpa-wrap).

    All doing what I need now.

    A suggestion for a future release would be to make that clearer in the admin interface – my reading was that because the label says ID attribute I didn’t need to include it in the field.


    Plugin Author Joe Dolson


    Yes, more accurately it needs to be a jQuery selector string; I can make that change in a future release.



    Thanks Joe, love your work.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘adding landmark role= to toolbar output’ is closed to new replies.