I want to create a dynamic list that displays like this -
<div class="list-wrapper">
<ul class="list">
<li class="list-item"> ... </li>
<li class="list-item"> ... </li>
...
<li class="list-item"> ... </li>
</ul>
</div>
The number of list items will vary as new items are added.
The requirement is for the list to stay anchored to the bottom of the viewport, even with new items being added.
- This means the list should not start at the top and scroll down using JS/TS; it needs to render from the bottom up.
Is there a way to achieve this using only layout / CSS, or do we need to implement something in JS/TS to auto-scroll to the latest item?
Please advise -- thank you!
Before anyone mentions -- that solution is not suitable due to accessibility (a11y) reasons; it's vital for the source order to match the reading order of the page.