Focus Builder
This page only introduces builder methods for configuring focus table. Complete explanation of focus mechanism see Focus Mechanism, runtime APIs for manipulating focus through ViewId see ViewId.
Actually exposed trait is:
focus_index
focus_index adds view to focus table, and sets its sort value in Tab order.
0 is legal sort value, don't understand it as canceling focus. Smaller numbers are visited by Tab first. Same sort value can also work, final sorting will still include ViewId and virtual focus number; however using clear incrementing values for same group of views is easier to maintain.
Not writing focus_index means not joining focus table. Such views won't be selected by Tab, also won't become view-level on_key_* focus target.
focus_scope
focus_scope provides a sort offset for current view and its subtree. It's suitable for splitting page into several areas, letting each area internally number from 0.
Final sort values above are:
focus_scope can nest, parent offset will continue accumulating to subtree.
Note: builder's focus_scope(u32) only affects sorting, doesn't limit Tab's runtime range. For popup layer, modal and similar focus isolation scenarios, use ViewId::push_focus_scope() and ViewId::pop_focus_scope(), mechanism explanation see Focus Mechanism.

