Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,3 @@ The [properties of the toolbar](/api-reference/10%20UI%20Components/dxToolbar/1%
---

#include datagrid-ontoolbarpreparing-jquery

#include btn-open-github with {
href: "https://github.com/DevExpress-Examples/devextreme-datagrid-custom-column-chooser"
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,3 @@ The [properties of the toolbar](/api-reference/10%20UI%20Components/dxToolbar/1%
---

#include datagrid-ontoolbarpreparing-jquery

#include btn-open-github with {
href: "https://github.com/DevExpress-Examples/devextreme-datagrid-custom-column-chooser"
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,5 @@ Specifies whether users can navigate between Toolbar items using standard keyboa
When this property is set to `true`, the Toolbar enables keyboard shortcuts that match [WAI-ARIA Authoring Practices (APG)](https://www.w3.org/WAI/ARIA/apg/patterns/toolbar/) recommendations. Users can move focus between available items with the arrow keys and the `Home` and `End` keys. The `Tab` and `Shift+Tab` keys move focus into and out of the Toolbar.

When this property is set to `false`, the Toolbar does not process item-to-item keyboard shortcuts. Each focusable item participates in the page tab order according to its settings.

[important] If you disable **allowKeyboardNavigation**, DevExtreme Toolbar will be less accessible to users who rely on keyboard navigation.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,3 @@ The [properties of the toolbar](/api-reference/10%20UI%20Components/dxToolbar/1%
---

#include datagrid-ontoolbarpreparing-jquery

#include btn-open-github with {
href: "https://github.com/DevExpress-Examples/devextreme-datagrid-custom-column-chooser"
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,20 @@ CardView offers different keyboard controls depending on the focused component a
</tr>
<tr>
<td>Left Arrow / Right Arrow</td>
<td>Moves focus between header panel items.</td>
<td>Moves focus between header panel items.<br>Moves focus between toolbar items.</td>
</tr>
<tr>
<td>Home<br/>End</td>
<td>Moves focus to the first/last item in the toolbar.</td>
</tr>
<tr>
<td>Shift + Right Arrow<br/>Shift + Left Arrow</td>
<td>Reorders the focused header item if <a href="/Documentation/ApiReference/UI_Components/dxCardView/Configuration/#allowColumnReordering">allowColumnReordering</a> is "true".</td>
</tr>
</table>

#include toolbar-kbn-behavior-defaultoptions-override

##### Sorting and Filtering

<table class="dx-table">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,14 @@ DataGrid offers different keyboard controls depending on which action users want

### Navigation

[note]

- The following DataGrid features do not support the **Ctrl+Home** and **Ctrl+End** shortcuts:
- Group summaries
- Grouped data
- Expanded master-detail interfaces
- When **scrolling**.[columnRenderingMode](/api-reference/10%20UI%20Components/GridBase/1%20Configuration/scrolling/columnRenderingMode.md '/Documentation/ApiReference/UI_Components/dxDataGrid/Configuration/scrolling/#columnRenderingMode') is *"virtual"*, the [filter row](/api-reference/10%20UI%20Components/GridBase/1%20Configuration/filterRow '/Documentation/ApiReference/UI_Components/dxDataGrid/Configuration/filterRow/') does not support keyboard navigation.

[/note]

<table class="dx-table full-width">
<tr>
<th>Key</th>
<th>Action</th>
</tr>
<tr>
<td>Arrow Keys</td>
<td>Moves focus between cells.</td>
<td>Moves focus between cells.<br>Moves focus between toolbar items (left and right arrow keys only).</td>
</tr>
<tr>
<td>Tab<br/>Shift + Tab</td>
Expand All @@ -39,7 +29,7 @@ DataGrid offers different keyboard controls depending on which action users want
</tr>
<tr>
<td>Home<br/>End</td>
<td>Moves focus to the first/last cell of the current row.</td>
<td>Moves focus to the first/last cell of the current row.<br>Moves focus to the first/last item in the toolbar.</td>
</tr>
<tr>
<td>Ctrl + Home<br/>Ctrl + End</td>
Expand All @@ -55,6 +45,24 @@ DataGrid offers different keyboard controls depending on which action users want
</tr>
</table>

[note]

- The following DataGrid features do not support the **Ctrl+Home** and **Ctrl+End** shortcuts:
- Group summaries
- Grouped data
- Expanded master-detail interfaces
- When **scrolling**.[columnRenderingMode](/api-reference/10%20UI%20Components/GridBase/1%20Configuration/scrolling/columnRenderingMode.md '/Documentation/ApiReference/UI_Components/dxDataGrid/Configuration/scrolling/#columnRenderingMode') is *"virtual"*, the [filter row](/api-reference/10%20UI%20Components/GridBase/1%20Configuration/filterRow '/Documentation/ApiReference/UI_Components/dxDataGrid/Configuration/filterRow/') does not support keyboard navigation.
- To navigate between toolbar items using **Tab**, you can disable the [allowKeyboardNavigation](/Documentation/ApiReference/UI_Components/dxToolbar/Configuration/#allowKeyboardNavigation) property of the built-in DataGrid toolbar. Configure [onToolbarPreparing](/Documentation/ApiReference/UI_Components/dxDataGrid/Configuration/#onToolbarPreparing) as follows:

<!-- tab: JavaScript -->
onToolbarPreparing(e) {
e.toolbarOptions.allowKeyboardNavigation = false;
}

If you disable **allowKeyboardNavigation**, the DataGrid toolbar no longer follows the [W3C ARIA APG Toolbar Pattern](https://www.w3.org/WAI/ARIA/apg/patterns/toolbar/). Your application will be less accessible to users who rely on keyboard navigation.

[/note]

### Column Sorting and Reordering

<table class="dx-table full-width">
Expand Down
8 changes: 7 additions & 1 deletion concepts/05 UI Components/Diagram/45 Keyboard Support.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ A user can press the following keys to interact with the UI component:
</tr>
<tr>
<td>Arrow Keys</td>
<td>Moves the selected elements one grid cell in the specified direction.</td>
<td>Moves the selected elements one grid cell in the specified direction.<br>Moves focus between toolbar items (left and right arrow keys only).</td>
</tr>
<tr>
<td>Ctrl + Arrow Keys</td>
Expand All @@ -61,6 +61,10 @@ A user can press the following keys to interact with the UI component:
<td>Alt + Arrow Keys</td>
<td>Clones the selected elements.</td>
</tr>
<tr>
<td>Home<br/>End</td>
<td>Moves focus to the first/last item in a toolbar.</td>
</tr>
<tr>
<td>Left Mouse Button Drag</td>
<td>Moves the selected elements. If you realize the mouse button above a container, places the elements inside this container.</td>
Expand All @@ -87,4 +91,6 @@ A user can press the following keys to interact with the UI component:
</tr>
</table>

#include toolbar-kbn-behavior-defaultoptions-override

Refer to the following section for more information: [Work with Chart Elements](https://devexpress.github.io/dotnet-eud/interface-elements-for-web/articles/diagram.html).
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,16 @@ A user can use the following keys to interact with the HTML Editor component:
</tr>
<tr>
<td colspan="2">Arrow Keys</td>
<td>Navigate through the table</td>
<td>
<ul>
<li>Navigate through the table</li>
<li>Move focus between toolbar items (left and right arrow keys only).</li>
</ul>
</td>
</tr>
<tr>
<td colspan="2">Home<br>End</td>
Comment thread
dmlvr marked this conversation as resolved.
<td>Move focus to the first/last item in the toolbar.</td>
</tr>
<tr>
<td>Ctrl + Shift + Up&nbsp;Arrow</td>
Expand Down Expand Up @@ -172,4 +181,6 @@ Configure [customizeModules](/api-reference/10%20UI%20Components/dxHtmlEditor/1%

---

#include toolbar-kbn-behavior-defaultoptions-override

#include common-code-register-key-handler
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,12 @@ A user can use the following keys to interact with the Scheduler component:
<tr>
<td>Scheduler UI component</td>
<td>Tab / Shift+Tab</td>
<td>Shifts focus to the next/previous appointment.</td>
<td>Shifts focus between appointments and the Scheduler toolbar area.</td>
</tr>
<tr>
<td><a href="/Documentation/ApiReference/UI_Components/dxScheduler/Configuration/toolbar/">Toolbar</a></td>
<td>Left Arrow or Right Arrow</td>
<td>Shifts focus between toolbar items.</td>
</tr>
<tr>
<td>Scheduler UI component</td>
Expand Down Expand Up @@ -71,4 +76,6 @@ A user can use the following keys to interact with the Scheduler component:
<td>Enter or Space</td>
<td>Selects the focused element in the tooltip.</td>
</tr>
</table>
</table>

#include toolbar-kbn-behavior-defaultoptions-override
Original file line number Diff line number Diff line change
@@ -1,24 +1,105 @@
A user can use the following keys to interact with the Toolbar component when [allowKeyboardNavigation](/api-reference/10%20UI%20Components/dxToolbar/1%20Configuration/allowKeyboardNavigation.md '/Documentation/ApiReference/UI_Components/dxToolbar/Configuration/#allowKeyboardNavigation') is set to `true`:
You can use the following keys to interact with the Toolbar component when [allowKeyboardNavigation](/api-reference/10%20UI%20Components/dxToolbar/1%20Configuration/allowKeyboardNavigation.md '/Documentation/ApiReference/UI_Components/dxToolbar/Configuration/#allowKeyboardNavigation') is set to `true`:

<table class="dx-table">
Comment thread
dmlvr marked this conversation as resolved.
<tr>
Comment thread
dmlvr marked this conversation as resolved.
<th>Key</th>
<th>Action</th>
</tr>
<tr>
<td>Tab</td>
<td>If a Toolbar receives focus, it focuses its first available item.</td>
</tr>
<tr>
<td>Shift + Tab</td>
<td>If a Toolbar receives focus, it focuses its last available item.</td>
<td>Tab / Shift + Tab</td>
<td>Moves focus to and away from the Toolbar. The first time users focus the Toolbar after initialization, the component highlights the first item. Subsequent focus events restore the previously highlighted item.</td>
</tr>
<tr>
<td>Left Arrow / Right Arrow</td>
<td>Moves focus to the previous or next available Toolbar item.</td>
</tr>
<tr>
<td>Up Arrow / Down Arrow</td>
<td>In the overflow, moves focus menu to the previous or next available Toolbar item.<br>When a ButtonGroup item has focus in the toolbar, moves focus between the ButtonGroup items.</td>
</tr>
<tr>
<td>Home / End</td>
<td>Moves focus to the first or last available Toolbar item.</td>
</tr>
</table>
<tr>
<td>Enter / Space</td>
<td>Activates the focused Toolbar item.</td>
</tr>
</table>

This keyboard navigation behavior applies to standalone Toolbar instances, as well as instances embedded in DevExtreme components such as DataGrid, FileManager, and Gantt. You can modify this behavior to allow users to navigate between items using **Tab**. Disable [allowKeyboardNavigation](/Documentation/ApiReference/UI_Components/dxToolbar/Configuration/#allowKeyboardNavigation) in a [defaultOptions()](/Documentation/ApiReference/UI_Components/dxToolbar/Methods/#defaultOptionsrule) call as follows:

---

##### jQuery

<!-- tab: index.js -->
DevExpress.ui.dxToolbar.defaultOptions({
options: {
onInitialized(e) {
if ($(e.element).closest('.dx-component-name').length) {
e.component.option('allowKeyboardNavigation', false);
}
}
}
})

##### Angular

<!-- tab: app.component.ts -->
import dxToolbar from "devextreme/ui/toolbar";
import { type DxToolbarTypes } from "devextreme-angular/ui/toolbar";
// ...
export class AppComponent {
constructor() {
dxToolbar.defaultOptions({
options: {
onInitialized(e: DxToolbarTypes.InitializedEvent) {
if (e.element?.closest('.dx-component-name')) {
e.component?.option('allowKeyboardNavigation', false);
}
}
}
})
}
}

##### Vue

<!-- tab: App.vue -->
<script setup lang="ts">
import dxToolbar from "devextreme/ui/toolbar";
import { type DxToolbarTypes } from "devextreme-vue/toolbar";

dxToolbar.defaultOptions({
options: {
onInitialized(e: DxToolbarTypes.InitializedEvent) {
if (e.element?.closest('.dx-component-name')) {
e.component?.option('allowKeyboardNavigation', false);
}
}
}
});
</script>

##### React

<!-- tab: App.tsx -->
import dxToolbar from "devextreme/ui/toolbar";
import { type ToolbarTypes } from "devextreme-react/toolbar";

dxToolbar.defaultOptions({
options: {
onInitialized(e: ToolbarTypes.InitializedEvent) {
if (e.element?.closest('.dx-component-name')) {
e.component?.option('allowKeyboardNavigation', false);
}
}
}
});

---

Replace `.dx-component-name` with a component ID or class.

[important] If you disable **allowKeyboardNavigation**, Toolbar no longer follows the [W3C ARIA APG Toolbar Pattern](https://www.w3.org/WAI/ARIA/apg/patterns/toolbar/). Your application will be less accessible to users who rely on keyboard navigation.
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,14 @@ TreeList offers different keyboard controls depending on what action users wish

### Navigation

[note] When **scrolling**.[columnRenderingMode](/api-reference/10%20UI%20Components/GridBase/1%20Configuration/scrolling/columnRenderingMode.md '/Documentation/ApiReference/UI_Components/dxTreeList/Configuration/scrolling/#columnRenderingMode') is *"virtual"*, the [filter row](/api-reference/10%20UI%20Components/GridBase/1%20Configuration/filterRow '/Documentation/ApiReference/UI_Components/dxTreeList/Configuration/filterRow/') does not support keyboard navigation.

<table class="dx-table full-width">
<tr>
<th>Key</th>
<th>Action</th>
</tr>
<tr>
<td>Arrow Keys</td>
<td>Moves focus between cells.</td>
<td>Moves focus between cells.<br>Moves focus between toolbar items (left and right arrow keys only).</td>
</tr>
<tr>
<td>Tab<br/>Shift + Tab</td>
Expand All @@ -35,7 +33,7 @@ TreeList offers different keyboard controls depending on what action users wish
</tr>
<tr>
<td>Home<br/>End</td>
<td>Moves focus to the first/last cell of the current row.</td>
<td>Moves focus to the first/last cell of the current row.<br>Moves focus to the first/last item in the toolbar.</td>
</tr>
<tr>
<td>Ctrl + Home<br/>Ctrl + End</td>
Expand All @@ -51,6 +49,20 @@ TreeList offers different keyboard controls depending on what action users wish
</tr>
</table>

[note]

- When **scrolling**.[columnRenderingMode](/api-reference/10%20UI%20Components/GridBase/1%20Configuration/scrolling/columnRenderingMode.md '/Documentation/ApiReference/UI_Components/dxTreeList/Configuration/scrolling/#columnRenderingMode') is *"virtual"*, the [filter row](/api-reference/10%20UI%20Components/GridBase/1%20Configuration/filterRow '/Documentation/ApiReference/UI_Components/dxTreeList/Configuration/filterRow/') does not support keyboard navigation.
- To navigate between toolbar items using **Tab**, you can disable the [allowKeyboardNavigation](/Documentation/ApiReference/UI_Components/dxToolbar/Configuration/#allowKeyboardNavigation) property of the built-in TreeList toolbar. Configure [onToolbarPreparing](/Documentation/ApiReference/UI_Components/dxTreeList/Configuration/#onToolbarPreparing) as follows:

<!-- tab: JavaScript -->
onToolbarPreparing(e) {
e.toolbarOptions.allowKeyboardNavigation = false;
}

If you disable **allowKeyboardNavigation**, the TreeList toolbar no longer follows the [W3C ARIA APG Toolbar Pattern](https://www.w3.org/WAI/ARIA/apg/patterns/toolbar/). Your application will be less accessible to users who rely on keyboard navigation.

[/note]

### Column Sorting and Reordering

<table class="dx-table full-width">
Expand Down
Loading