Skip navigation anchor

This forum is for all Flare issues related to the HTML5, WebHelp, WebHelp Plus, and Adobe Air Targets
Post Reply
Jess77
Sr. Propeller Head
Posts: 154
Joined: Thu May 01, 2014 3:19 pm
Location: Florida
Contact:

Skip navigation anchor

Post by Jess77 »

My web team gave me the code to tell screen readers to skip the navigation bar and header. It is as follows:

Code: Select all

the anchor markup skip the header is:
<a href="#Id_Of_First_Element_In_Content_Area" class="sr-only">Skip to main content</a>
you can get the sr-only class from bootstrap 
My question is, where do I put it in Flare? In the skin? Or the master page?
It needs to be at the top of every topic.

I'm using a tripane project and skin.

Thank you!
Jessica N.
Certified MadCap Advanced Developer for Flare
NorthEast
Master Propellus Maximus
Posts: 6363
Joined: Mon Mar 05, 2007 8:33 am

Re: Skip navigation anchor

Post by NorthEast »

The only place you can add HTML code to the body is by adding it to the master page, but in the output HTML it would be placed after Flare's generated code for the navigation - which I assume is no good.

You could use javascript to move this tag to the top of the HTML body, so that would work in the browser, but I don't know whether that would also work for a screen reader - i.e. whether the screen reader looks at the HTML source, or the HTML DOM after the script is run. The script itself would be pretty simple, so your web team should be able to tell you how to do that.
Post Reply