Difference between revisions of "Keyboard Tab Order"

From HLKitWiki
Jump to: navigation, search
(Tab Order Within Tables)
(Tab Order Within Panels)
Line 32: Line 32:
 
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.
 
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==
+
==Tab Order Within Panels and Forms==
  
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.
+
Within a panel or form, the tab order of the contained layouts is dictated by the sequence in which the layouts are specified within the panel. When a panel/form 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 moves 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/form, the focus is given to the first layout, and the entire cycle begins anew.

Revision as of 17:41, 20 November 2008

[Context: HL KitBasic Concepts and TerminologyManipulation 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 bit interesting. The following sequence outlines the logic used for tables.

  1. If the table has a header template, then any portals within the header are first assigned the focus.
  2. After the header, the table itself is considered as being a selectable portal via the keyboard, so it receives the focus next. This is only performed for tables that are scrollable, since given the focus to the table allows it to be scrolled via use of the arrow keys.
  3. After the table itself, control passes to the first item within the table. The template associated with the first item dictates the tab order for portals displaying information about the first item.
  4. Control passes through each item in the table, in order, with the template again dictating the tab order for that item.
  5. If the table has an add option or footer at the bottom, control passes to it. The template associated with the add option or footer dictates the tab order for portals therein.

Once control passes from the last portal within with the table, it transfers to the layout that contains the table.

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 and Forms

Within a panel or form, the tab order of the contained layouts is dictated by the sequence in which the layouts are specified within the panel. When a panel/form 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 moves 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/form, the focus is given to the first layout, and the entire cycle begins anew.