DEV Community

anpos231
anpos231

Posted on

Performant infinite lists and accessibility.

I read this article on medium:
https://medium.com/walmartlabs/infinite-scrolling-the-right-way-11b098a08815

The author says, that to keeps things performant, we can reuse existing <li> elements, instead of adding new <li> to <ul>. And to create an immersion of scrolling we can use padding on <ul>.

One question immediately came to my mind: since screen readers announce the size of the list, based on the actual number of <li> inside <ul>, screen reader users will be unable to find out how big that list actually is.

Non-screen reader users will fill the immersion, but screen reader users wont.

Top comments (0)