I am using Intersection Observer on a client's site to lazily load expensive parts of pages until a user scrolls them partially into view.
For example, the HTML may look something like the following:
<html>
<body>
<header>
<h1>Page Title</h1>
</header>
<section aria-labelledby="section-1-title">
<h2 id="section-1-title">Section One Title</h2>
<p>Lorem ipsum, dolor sit amet...</p>
</section>
<section aria-labelledby="section-2-title">
<h2 id="section-2-title">Section Two Title</h2>
<p>Lorem ipsum, dolor sit amet...</p>
</section>
<section data-lazyload="true" aria-labelledby="section-3-title"> <!-- Clearly poor aria use here. Could use aria-label, but is that best? -->
<!-- This content would be programmatically rendered once scrolled into view -->
</section>
</body>
</html>
My questions are:
What accessibility concerns should I be thinking about and preparing for?
How does this lazy loading method affect the document's accessibility tree?
Does the document's accessibility tree refresh after new content is loaded in?
What can I do to better equip assistive technology users to navigate the page's content?
Is there a best practice or a larger body of information that I should be studying?