The focus management was the central issue of last week’s development activities – results are part of today’s update 20160509.
HTML only comes with a simple but limited tab sequence policy: it by default follows the order of elements of the DOM tree. There is the possibility to explicitly assign a tab-index to each component – but this tab-index cannot be nested in any way, so it’s quite complex to use when having dynamic pages.
Our client as consequence now provides some own focus management, with explicit focus policies – in which the tab sequence is not (only) depending on the structure of the DOM tree. A typical example is the moving of columns within a grid – which of course must have some consequence on the tab order. We internally do not re-arrange the whole corresponding DOM tree but just re-layout the grid structure with new coordinates for the column cells. – The focus policy knows that within a grid rows are processed from the top to the bottom, and cells are processed from the left to the right – so the tab sequence stays correct.
This again is a nice example, where it’s a good idea to shift responsibility from the browser’s core processing into some programmed layer in front of the browser. Luckily HTML provides corresponding possibilities to do so!