Accessibility - "Lang" on html

Hello,

I'm developing a Web Application wich has to be verified about the accessibility. The only problem I'm facing is that the "language" of the portal is not definied on the begining of the html document, I already injected the "lang" to html string through JS in the preparation but it still adds the language after page is completly loaded, and the accessibility portal assumes that the "Lang" is not definied. I presume that is because the attribute doesn't come with the inicial script.

Can someone help me on this pls?

Solution

Hi Francisco,

Where does the "lang" attribute need to be defined? Is it in the <HTML> tag of the page?

Have you checked out the HTTPRequestHandler extension? The AddAttributeToHtmlTag method looks promising:

Solution

Afonso Carvalho wrote:

Hi Francisco,

Where does the "lang" attribute need to be defined? Is it in the <HTML> tag of the page?

Have you checked out the HTTPRequestHandler extension? The AddAttributeToHtmlTag method looks promising:


This exactly what I need, thank you very much. 

No problem. If you need to do any other changes to the page content that lives "outside" of the <body>, the HTTPRequestHandler extension will probably have you covered.