Impact of regenerating DOM on accessibility
We're considering two approaches to handling a browser-based UI.
- Regenerate the entire UI view (DOM tree) whenever the 'back end' (model) changes
- Tweak only the parts that change (marked up as aria-live), and keep everything else static
I am mostly interested in whether there are any compelling accessibility-related caveats or recommendations for either of these.
There are substantial parts of our UI which will not change. My gut feeling is that rebuilding these is inefficient and undesirable.
My expectation is that a broad range of assistive technologies would 'prefer' (i.e. better handle) a fairly static DOM with localized changes, but this is only a guess. I'm especially curious how the element in focus will be affected.
Changing only parts of the UI requires code which will keep track of changes, which may be as expensive as (or dearer than) rebuilding the whole tree.
FWIW We're leaning towards react.js to handle this. React is still new to me, but have not settled on the tech. It seems that react offers any mix of these approaches.