Course progress: 0 / 20 lessons

LESSON 17 OF 20

Controls and navigation

Custom controls must expose the same complete contract that users receive from strong native controls: meaning, state, operation, and predictable focus.

  • Reading: about 3 minutes
  • Knowledge check: 2-3 minutes
  • Optional practice: 9 exercises, 5-15 minutes each
In this lesson

Evaluate keyboard paths, focus order, control semantics, state, relationships, and recovery.

Start with native behavior

Native elements provide semantics, focus, and keyboard behavior that custom components otherwise have to recreate and maintain.

Keep focus and state distinct

Focus identifies the current interaction location. Selected, checked, expanded, and current describe state. A useful control exposes both correctly.

Follow the complete keyboard path

Test entry, movement, activation, Escape behavior, and focus return. A control is not accessible merely because Tab eventually reaches it.

Communicate relationships

Tabs and panels, menu buttons and menus, disclosures and controlled content, and help text and fields all need programmatic relationships.

What to remember

A custom control is complete only when its name, role, state, relationships, focus behavior, and keyboard operation work together.

Knowledge check

Answer every question, then use the forward lesson button to record this lesson as complete. The check is not scored and can be repeated.

1. What must a custom toggle expose?

2. What is the difference between focus and selection in tabs?

NEXT STEP

Continue to lesson 18: Complex widgets and data

Move on when you are ready. Your knowledge-check answers are not stored.