Keyboard Tab Order

From HLKitWiki
Revision as of 08:03, 20 November 2008 by Rob (talk | contribs) (New page: Category:Basic Concepts and Terminology [Context: HL KitBasic Concepts and TerminologyManipulation of Visual Elements] ==Overview== HL provides full ...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

[Context: HL Kit … Basic Concepts and Terminology … Manipulation of Visual Elements]

Overview

HL provides full keyboard support for navigating around the interface. This includes the ability to use the <Tab> key to move through the various visual elements via the keyboard.

Tab Order Within Templates

Authors can easily control the order in which portals are moved between within a given template. The tab sequence for portals is simply the order in which the portals are defined within the template. If a portal is listed as the very first portal within the template, then the HL engine assumes that portal should be given the keyboard focus first. If the user presses the <Tab> key, then the next portal defined within the template becomes the new keyboard focus. This process continues until the last portal in the template is reached.

If a portal within the template cannot be given the keyboard focus, the focus goes to the next portal, continuing until a valid portal is found. Some portal types, such as labels, can never receive the keyboard focus. Other portals can be made non-visible or disabled via scripts, which renders them unable to receive the keyboard focus.

Tab Order Within Tables

The tab order within a table gets a little bit interesting. The table itself is considered as being a selectable portal via the keyboard, and it receives the focus first.

header table for scrolling template for item 1 template for item 2 etc. add item


Tab Order Within Layouts

Within a layout, the tab order of the various visual elements is controlled by the "taborder" attribute that can be assigned by the author. Both portals and templates are mixed together for the purposes of determining tab order, and they are sequenced in increasing order based on the value assigned.

When a template is next in the tab order, HL will transfer control to the first portal within the template that can accept the focus. The focus will continue through to the last portal within the template. Once the last portal is reached, the focus will be transferred to the next template or portal specified by the layout.

When a portal is next in the tab order, HL will set the focus to that portal. If the portal contains other portals (e.g. a table), then the focus will continue to move through the contents of the portal. Once the final child portal is reached, the focus will be transferred to the next template or portal specified by the layout.

Tab Order Within Panels

Within a panel, the tab order of the contained layouts is dictated by the sequence in which the layouts are specified within the panel. When a panel is shown, the first layout is given the focus, and the appropriate rules for layouts are used to establish the initial focus. When the user move through the last visual element within the layout, the next layout is given the focus, and the process continues. When control returns from the final layout within the panel, the focus is given to the first layout, and the entire cycle begins anew.