-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Toolbar KBN Improvements: Add Info to A11y Docs #9139
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: feature/26_2_toolbar-kbn-improvement
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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.</td> | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The focus moves between appointment area to the toolbar area. |
||
| </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> | ||
|
|
@@ -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,4 +1,4 @@ | ||
| 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"> | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| <tr> | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
|
|
@@ -21,4 +21,79 @@ A user can use the following keys to interact with the Toolbar component when [a | |
| <td>Home / End</td> | ||
| <td>Moves focus to the first or last available Toolbar item.</td> | ||
| </tr> | ||
| </table> | ||
| </table> | ||
|
|
||
| This keyboard navigation behavior applies to all Toolbar instances within your app, including instances embedded in DevExtreme components such as DataGrid, FileManager, and Gantt. To modify this behavior in built-in Toolbar instances and allow users to navigate between items using **Tab**, you can disable [allowKeyboardNavigation](/Documentation/ApiReference/UI_Components/dxToolbar/Configuration/#allowKeyboardNavigation) in a [defaultOptions()](/Documentation/ApiReference/UI_Components/dxToolbar/Methods/#defaultOptionsrule) call as follows: | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not sure here, but technically not every toolbar have allowKeyboardNavigation: true, for example popup still have allowKeyboardNavigation false. Usually it's is not a public toolbars, but maybe will be better to avoid "all" word here. |
||
|
|
||
| --- | ||
|
|
||
| ##### 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. | ||


Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor: In the editor, the Home and End keys control the behavior of the caret.