Chapter 3. User Interface Fundamentals

Summary of Requirements for UI Fundamentals

Note   It is not required that a server application have any graphical UI. However, any graphical UI that is presented must meet these requirements. Regardless of whether graphical UI is presented, all applications must adhere to Requirement 3.5.

Rationale

Customer benefits

Requirements

  1. Support standard system size, color, font, and input settings

  2. Ensure compatibility with the High-Contrast option

  3. Provide documented keyboard access to all features

  4. Expose the location of the keyboard focus

  5. Do not place shortcuts to documents, help or uninstall in the Start menu

References

Guidelines for accessibile software design
www.microsoft.com/enable/

Microsoft Active Accessibility®,
See the Platform SDK.

Microsoft media player information
www.microsoft.com/windows/mediaplayer/en/

Microsoft Windows Guidelines for User Interface Design,
Available from MSDN and MS Press.

How to Comply with Requirements for UI Fundamentals

1. Support Standard System Size, Color, Font, and Input Settings

Your application must read and use system-wide user interface settings when displaying customized controls or window content. Standard controls provided by USER32.DLL and COMCTL32.DLL automatically support all of the required settings. Applications can add support for these settings to their own windows by calling DefWindowProc in the window procedure. Applications should be careful to handle these settings when:

These settings are queried using the GetSysColor, GetSystemMetrics, and SystemParametersInfo functions. For more information, see the "System Information Functions" in the Microsoft Platform SDK, or at:
http://msdn.microsoft.com/library/psdk/sysmgmt/sysinfo_8stv.htm.

 All applications must support:

 SPI_GETHIGHCONTRAST All GetSysColor settings are required for menus, dialog boxes, and other standard UI elements. See Requirement 2 in this chapter.
SPI_GETWORKAREA Primary display monitor work area size

Customized fields for text selection or editing must support:

 SPI_GETCARETWIDTH Caret width in edit field

Customized combo boxes must support:

 SPI_GETCOMBOBOXANIMATION Slide-open effect for combo boxes must be disabled when this setting is false

Customized keyboard handlers (low-level input) must support:

 SPI_GETKEYBOARDDELAY

 SPI_GETKEYBOARDSPEED

Keyboard repeat-delay setting

Keyboard repeat-speed setting

SPI_GETFILTERKEYS Expanded range for above

Customized menus must support:

 SM_CYMENUCHECK, CXMENUCHECK Default menu check-mark dimensions
SM_CYMENU Single-line menu bar height
SPI_GETNONCLIENTMETRICS

  IfMenuHeight

  lfMenuFont

  lfMessageFont

Menu bar height

Menu bar font

Message box font

SPI_GETSELECTIONFADE Menu fade must be disabled when this setting is FALSE
SPI_GETMENUANIMATION Menu animation must be disabled when this setting is FALSE
SPI_GETMENUFADE Menu fade animation must be disabled when this setting is FALSE

Specialized mouse functions must support:

 SM_CYDOUBLECLK,

 SM_CXDOUBLECLK

Maximum vertical and horizontal distances the mouse can move between successive clicks and still be interpreted as a double-click
SM_CYDRAG, SM_CXDRAG Minimum vertical and horizontal distances the mouse must be moved with button down to start a drag operation
SPI_GETMOUSEHOVERHEIGHT

 SPI_GETMOUSEHOVERWIDTH

Height and width of the rectangle within which the mouse pointer has to stay to activate hover effects
SPI_GETMOUSEHOVERTIME Mouse hover time

Customized scroll bars must support:

 SM_CYHSCROLL

 SM_CXVSCROLL

Height of horizontal scroll bar

Width of a vertical scroll bar


Application sounds must support:

 SPI_GETSHOWSOUNDS When TRUE, the application must present all information visually rather than by sound alone

Customized tooltips and status bars must support:

 SPI_GETNONCLIENTMETRICS

  SPI_lfStatusFont

Font used in status bars and tooltips
SPI_GETTOOLTIPANIMATION ToolTip animation must be disabled when this setting is FALSE

Customized window frames must support:

 SM_CYSMCAPTION Small caption height
SPI_GETNONCLIENTMETRICS

  IfCaptionFont

Caption font information

SM_CYBORDER, SM_CXBORDER Minimum thickness of a line, in pixels. Applications should not draw lines thinner than this because on high-resolution monitors a 1-pixel line might be nearly invisible. (The display driver sets this number, and it is also increased when the user selects the Custom System Font Size in Control Panel.)
SM_CXEDGE

 SM_CYEDGE

Thickness of a 3D edge, in pixels. Each 3D edge is comprised of two adjacent lines, so the thickness is 2 * SM_CxBORDER.
SM_CXSIZEFRAME

 SM_CYSIZEFRAME

Thickness of the complete resizable window frame, in pixels.
SM_CYFIXEDFRAME

 SM_CXFIXEDFRAME

Thickness of a non-resizable window frame, in pixels. This is made up of one 3D edge whose thickness is SM_CxEDGE plus one line of space whose thickness is SM_CxBORDER.

2. Ensure Compatibility with the High-Contrast Option

Your application must be compatible with the High-Contrast option, which indicates that the user requires a high degree of contrast to improve screen legibility. Standard controls provided by USER32.DLL and COMCTL32.DLL automatically support all of the required settings. Applications only need to support it explicitly when creating custom window classes or controls, or altering the normal behavior of standard windows or controls.

Applications can determine the value of the High-Contrast option using the SystemParametersInfo function with the SPI_GETHIGHCONTRAST constant. When this option is set, your application must:

Note   Users can adjust the High-Contrast option from the Accessibility Options section of Control Panel, by selecting the Display tab and then the Use High-Contrast check box.

Users can adjust the values returned by GetSysColor using the Display section of Control Panel, by selecting the Appearance tab.

The High-Contrast option can be used with any appearance scheme, and selecting a scheme through the Display section of Control Panel does not affect the High-Contrast option setting.

Exceptions   Certain application features may be exempted from High-Contrast requirements when the use of color is intrinsic and indispensable to the goal of the feature. Examples include:

3. Provide Documented Keyboard Access to All Features

Your application must provide keyboard access to all features, so that a mouse or other pointing device is not required for its use. Standard controls provided by USER32.DLL and COMCTL32.DLL automatically support all the required settings. Applications must explicitly provide this support only when:

User interface elements that rely on standard Windows keyboard documentation should support equivalent standard window class keyboard behavior. If a specific user interface element, such as a custom control, requires a mouse or other pointing device, its functionality must also be available through keyboard input.

All keyboard techniques required to operate the application must be documented, except for elements that follow Windows conventions, e.g., standard menus and controls. Applications must document non-intuitive complex procedures, customized window class usage, and controls that do not conform to normal conventions. The product's standard documentation must either include this information or direct the user to the appropriate documents.

Example: Information can be delivered by online help, with text file on the product CD, or through the product's Web site.

Note   Keyboard behavior of standard window classes is documented in The Microsoft Windows Keyboard Guide, which is available at www.microsoft.com/enable/.

Exceptions   Exemptions may be made in the following cases:

4. Expose the Location of the Keyboard Focus

Your application must visually indicate the location of the keyboard focus, and notify other software of this location by using Microsoft Active Accessibility or by moving the system caret.

The application must display a visual focus indicator at all times when it is the active window, so users can anticipate the effects of keystrokes they type. Exposing its location to other software enables the use of the panning software supported by many display adapters and accessibility aids such as the Magnifier accessory included with Windows 2000.

When it is not feasible to use Microsoft Active Accessibility, the application may indicate the focus location by moving the system caret. The caret is normally the blinking vertical bar that the user sees when editing text, but it can be placed anywhere on the screen, made any shape or size, and even made invisible. If it is invisible, it can be moved to indicate the focus location to applications without disturbing what the user sees on the screen.

To create an invisible caret, call the CreateCaret function to set the caret's size and shape and the SetCaretPos function to move it to wherever you are drawing the visual focus indicator (the highlighted cell, icon, button, and so on). Note that it is present but remains invisible unless you explicitly make it visible.

Each time the focus moves to a new object with a different size, the application should call DestroyCaret and then use CreateCaret to specify the size of the new object. The system caret must cover the bounding rectangle of the screen element, so that screen magnification tools can allow the user to zoom-in on different portions of the region.

An application should only display focus and selection indicators when they are in the active window. When the window loses activation, the application should remove the visual indicator and call the DestroyCaret function.

Exception   Applications and features that are exempt from the keyboard access requirement as described earlier in this section are also exempt from the requirement to expose keyboard focus location. However, it is strongly recommended that applications expose the keyboard focus location for any feature that provides keyboard access.

5. Do Not Place Shortcuts to Documents, Help, or Uninstall in the Start Menu

The Start menu is designed to give users easy access to launch applications. Usability studies show that when the Start menu becomes too cluttered, users can no longer do this.

The following behaviors, though not required, are recommended:

How to Pretest Applications for UI Fundamentals

To Pretest System Metrics Support

  1. Open Control Panel, and then open the Display applet.

  2. Choose the Appearance tab.

  3. Select a scheme with the "(extra large)" designation, such as Windows Standard (extra large) scheme. Click on Apply.

  4. Test the application's main screens, dialog boxes, and controls to ensure that these changes have been instated and the application is still usable.

    Screen elements should be displayed correctly and compatible with the appearance scheme, i.e., menu items, title bars, icons and icon titles, window borders and scroll bars are displayed with appropriate sizes and fonts. Text and controls should never overlap and text should not be truncated inappropriately. Examples of appropriate truncation are:

To Pretest High-Contrast Support

  1. Open Control Panel, and then open the Accessibility Options.

  2. Choose the Display tab.

  3. Select the Use High-Contrast option.

  4. Choose Settings.

  5. Choose Custom, and verify that High-Contrast Black is selected. Apply these settings.

  6. Go back into your product and test the major screens, dialog boxes, and controls to ensure that these changes have been properly reflected.

  7. Repeat, selecting the High-Contrast White option in Step 5.

    The application should still be usable. Screen elements should be displayed correctly and be compatible with the appearance scheme. For example, make sure that text contrasts with its background, that graphics on toolbar buttons are distinguishable, that lines are still visible, and that no images or complex backgrounds appear behind text.

    If nothing within the window is displayed using the selected color scheme, verify that the user can adjust the display colors without having to alter the document.

To Pretest Documented Keyboard Access

  1. Open Control Panel, and then open the Accessibility Options.

  2. Choose the Keyboard tab.

  3. Select the Show Extra Keyboard Help. Apply these settings.

  4. Exercise the major functions within your application without using a mouse.

  5. Verify that a mouse is not required for any activity.

    For example, if a command on a toolbar can only be used with a mouse, make sure that the equivalent command is also available through a menu or through a documented keyboard shortcut.

    The product documentation and user interface must make clear how to carry out a task using the keyboard or it must be readily inferred using knowledge of standard Windows keyboard conventions. If the documentation is not clear, the product fails the requirement to use adequately documented keyboard UI.

  6. Verify that all menu items and controls have underlined access keys.

To Pretest Exposure of Keyboard Focus

  1. Use the Magnifier accessory that is included with Windows 2000. From the Start menu, choose Programs -> Accessories -> Accessibility -> Magnifier.

  2. Navigate through your application using the keyboard, making sure that Magnifier accurately tracks and displays the area with the keyboard focus. In particular, verify that Magnifier: