public interface CustomTabElements
<input>element is written into some Canvas as part of its contents, a developer would likely want this element to be included in the tab sequence for the page in its intuitive spot (between the canvas it is embedded in and any subsequent canvases on the page).
To achieve this a developer needs to take several steps:
<input>element written into a Canvas, the developer would choose an arbitrary identifying string for the input element, and call the
TabIndexManager.addTarget()API, passing in the
ID of the canvas in which it is embeddedas the parentID parameter.
TabIndexManager.getTabIndex()to retrieve a a numeric tabIndex to apply to the element. This can be used when generating the HTML to write out for the element.
moving the canvas containing the item to a new parentwould cause this value to change. The
tabIndexUpdatedcallback parameter of the
TabIndexManager.addTarget()method is a notification which will be called when this occurs, and may be used to update the element's tab index if it has already been written into the DOM when the value changes.
click maskis up, using the Tab key to navigate between editors embedded in a ListGrid during
grid editing, and for any focusable UI embedded in a canvas where
Canvas.alwaysManageFocusNavigationhas been explicitly set to true.
shiftFocusCallbackparameter should be passed to
TabIndexManager.addTarget()when registering an ID for the custom element. This is a callback developers should implement to put native focus into the target (or return false if this is not currently possible for some reason). It will be invoked automatically by the system when focus is being shifted programmatically
TabIndexManager.useExplicitFocusNavigation(), passing in the ID that was registered via
TabIndexManager.addTarget()), and if that returns true explicitly calling
TabIndexManager.shiftFocus(), and preventing default native behavior by invoking preventDefault() on the native event object.