Cursor navigation with up/down arrow keys works with static HTML:

However, when using a programmatic approach (see script in this web page), cursor movement with up/down arrow keys break, even though the DOM has the same structure.