New to Telerik UI for Blazor? Download Free 30-day trial

ListBox - Keyboard Navigation

  • Peter Franken
  • Maurizio Moroni
  • Paula Wilson
  • Sergio Gutiérrez
  • Horst Kloss
  • Lúcia Carvalho
  • Bernardo Batista
  • Isabel de Castro
  • Georg Pipps
  • Guillermo Fernández
  • Marie Bertrand
  • Henriette Pfalzheim
  • Rene Phillips
  • Yvonne Moncada
  • Simon Crowther
  • Alexander Feuer
  • Jean Fresnière
  • Catherine Dewey
  • Giovanni Rovelli
  • Fran Wilson
  • Keyboard-navigation.razor
  • CustomerService.cs
  • CustomerDto.cs
Loading the demo source code...please wait.

Style in ThemeBuilder

  • Custom SASS variables
  • Atomic customizations
  • Sharing projects
Start Theming

Focus

  • Alt + W focuses the first component in the example

Supported keys and user actions

Managing Focus

The ListBox component contains a list of items and, optionally, a toolbar. When the toolbar is not enabled, the component is a single-tab-stop component. When the toolbar is present, it is included in the tab sequence of the page. Depending on its position and the LTR or RTL configuration, the toolbar can either preceed or succeed the list of ListBox items. Its tab position must respect its position on the screen.

List

  • F10 focuses the ListBox toolbar (the last focused or the first button in it).
  • Space selects the focused ListBox item.
  • Up Arrow selects the previous item.
  • Down Arrow selects the next item.
  • Ctrl (or Control on Mac) + Space selects or deselects an item.
  • Shift + Up Arrow adds the previous item to the selected items.
  • Shift + Down Arrow adds the next item to the selected items.
  • Ctrl (or Cmd on Mac) + Up Arrow moves the focus to the previous item.
  • Ctrl (or Cmd on Mac) + Down Arrow moves the focus to the next item.
  • Del deletes the selected items.
  • Ctrl (or Cmd on Mac) + Right Arrow adds the selected items to the connected ListBox.
  • Ctrl (or Cmd on Mac) + Left Arrow adds the selected items from the connected ListBox to the current one.
  • Ctrl (or Cmd on Mac) + Shift + Up Arrow shifts the selected items upwards.
  • Ctrl (or Cmd on Mac) + Shift + Down Arrow shifts the selected items downwards.
  • Ctrl (or Cmd on Mac) + Shift + Right Arrow transfers all items to the connected ListBox.
  • Ctrl (or Cmd on Mac) + Shift + Left Arrow transfers all items from the connected ListBox.

Toolbar

  • Right Arrow or Down Arrow focuses the next button in the Toolbar.
  • Left Arrow or Up Arrow focuses the previous button in the Toolbar.
  • Enter executes the currenly focused button command if enabled.

Description

Keyboard navigation provides all web and app users with a fast keyboard-only navigation capability and is also part of the web accessibility features - it enables users with disabilities to fully control their website or app access through the keyboard.

By default, users can only navigate to links, buttons, and form controls with a keyboard. The navigation order in which interactive items receive keyboard focus has to be logical and intuitive. Generally, keyboard navigation logic needs to follow the visual horizontal and vertical flow of the page, for example, left to right and top to bottom, header first followed by the main and then the page navigation.

The keyboard navigation of the Telerik UI for Blazor AutoComplete is always enabled, as demonstrated in this demo.

This Blazor ListBox Keyboard Navigation example is part of a unique collection of hundreds of Blazor demos, with which you can see all Telerik UI for Blazor components and their features in action. View the source code of the demos from the library or directly adapt, and edit them and their theme appearance in Telerik REPL for Blazor or ThemeBuilder.

Support & Learning Resources

An error has occurred. This application may no longer respond until reloaded.