TagBox - Keyboard Support
- 3 minutes to read
The DevExpress Blazor TagBox supports keyboard navigation. Users can focus the editor’s input element, navigate within the drop-down item list, and select tags. While DOM focus refers to the input element as the active element for keyboard interaction, visual focus can move to items in the drop-down list. Keyboard navigation is also supported in virtual scroll mode.
Note
Keyboard support allows users who cannot use a mouse or rely on assistive technologies (like screen readers or switch devices) to interact with application content. Refer to the Accessibility help topic for information on other accessibility areas that we address.
Shortcut Keys for Input Element
The following shortcut keys are available when the editor’s input element is focused:
| Shortcut Keys | Description |
|---|---|
| Tab | Moves focus to the next focusable element on a page. Note that input elements (Clear button and selected tags) are excluded from the page tab sequence. If AllowCustomTags is set to true, entered characters are applied as a custom tag. |
| Shift + Tab | Moves focus to the previous focusable element on a page. |
| Alt + Delete | Clears the input element. |
| Characters | Adds characters to the input if AllowCustomTags is set to true. |
| Backspace, Delete | Removes characters in the input element if AllowCustomTags is set to true. If there are no characters in the input, Backspace removes the last existing tag. |
| Home | Moves the cursor to the start of the text input if AllowCustomTags is set to true. |
| End | Moves focus to the end of the text input if AllowCustomTags is set to true. |
| Right Arrow | Moves the cursor one character to the right in the input element if AllowCustomTags is set to true. When the cursor reaches a right edge, nothing happens. |
| Left Arrow | Moves the cursor one character to the left in the input element if AllowCustomTags is set to true. When the cursor reaches a left edge, nothing happens. |
| Alt + Down Arrow | Opens the drop-down list, but keeps focus on the input element. |
Shortcut Keys for Drop-Down Item List
The following shortcut keys are available when the drop-down list is opened:
| Shortcut Keys | Description |
|---|---|
| Up Arrow | Moves focus one item up. |
| Down Arrow | Moves focus one item down. |
| Ctrl + Shift + Home | Moves focus to the first item on the list. |
| Ctrl + Shift + End | Moves focus to the last item on the list. |
| Page Up | Moves focus to an item on the previous page. |
| Page Down | Moves focus to an item on the following page. |
| Tab | Selects the focused item, updates the Tags parameter value, closes the drop-down list, moves focus to the input element. |
| Enter | Selects the focused item, updates the Tags parameter value, and closes the drop-down list. |
| Escape, Alt + Up Arrow | Closes the drop-down list. |
The TagBox does not currently allow you to navigate through elements in templated items.