How Sitemorse II lets you find dynamic content

24 Oct 2022 | Developer Corner

Michael Carter
  • Tweet this item
  • share this item on Linkedin

 

Imagine you have an issue with your dynamically loaded cookie panel but you cannot find where it is in the HTML source.

One of the big advantages of using Sitemorse II as the engine to perform your assessments, is you have access to content loaded into the browser when JavaScript loads. Almost all sites do this to a certain extent and the most common JavaScript load we see is the accept cookies dialogue when you first visit the website.

An issue with loading content dynamically, is that what you have loaded is in the updated document model in your browser, but it is not in the HTML source. Developers need to locate the issue on the page but, how can you see something that is not in the HTML source? Sitemorse II shows the location of the item in the document model. Those who are familiar with the reports generated by Sitemorse I will recognise a new icon in the Sitemorse II reports in the line / page column. Mouseover this icon to see the location of the HTML in the document.

Sitemorse report line page

 

 

If you are familiar with using standard browser developer tools, you can use this information to search for the location in the document.

 

search in chrome developer

 

In the event that your Sitemorse II report lets you know there is an accessibility or link issue with your dynamically loaded cookie panel (or any dynamically loaded content, for that matter), you can find the issue much easier now.