-
Notifications
You must be signed in to change notification settings - Fork 665
Scheduler - A11y - Add Home and End hotkeys, change scheduler's role, extend appointment's aria-describedby #32575
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
Merged
Tucchhaa
merged 11 commits into
DevExpress:26_1
from
Tucchhaa:implement_appt_hotkeys_26_1
Feb 17, 2026
+441
−66
Merged
Changes from 5 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
b65ab26
impl hotkeys
Tucchhaa 2328c45
add text to aria-describedby
Tucchhaa b595f9e
fix tests
Tucchhaa 904882f
apply copilot's review
Tucchhaa c537ff8
add tests to check e.preventDefault()
Tucchhaa b2a6d6c
fix scrollTo usage
Tucchhaa 54409f5
fix testcafe test
Tucchhaa b45b9e1
Merge branch '26_1' into implement_appt_hotkeys_26_1
Tucchhaa 10a7d53
rewrite test
Tucchhaa 59e9322
rename localization varaibles
Tucchhaa 3e4a5e5
update localization var name in test
Tucchhaa File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
105 changes: 105 additions & 0 deletions
105
e2e/testcafe-devextreme/tests/scheduler/common/keyboardNavigation/appointments.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,105 @@ | ||
| import Scheduler from 'devextreme-testcafe-models/scheduler'; | ||
| import { ClientFunction } from 'testcafe'; | ||
| import url from '../../../../helpers/getPageUrl'; | ||
| import { createWidget } from '../../../../helpers/createWidget'; | ||
|
|
||
| fixture.disablePageReloads`KeyboardNavigation.Appointments` | ||
| .page(url(__dirname, '../../../container.html')); | ||
|
|
||
| const PARENT_SELECTOR = '#parentContainer'; | ||
| const SCHEDULER_SELECTOR = '#container'; | ||
|
|
||
| test('Document should not scroll on \'End\' press when appointment is focused', async (t) => { | ||
| const scheduler = new Scheduler(SCHEDULER_SELECTOR); | ||
|
|
||
| await t | ||
| .click(scheduler.getAppointment('Appointment 1').element) | ||
| .pressKey('End'); | ||
|
|
||
| const scrollTop = await ClientFunction(() => document.body.scrollTop)(); | ||
|
|
||
| await t.expect(scrollTop).eql(0); | ||
| }).before(async () => { | ||
| ClientFunction((selector) => { | ||
| const parent = document.querySelector(selector) as HTMLElement; | ||
| parent.style.height = '2000px'; | ||
| })(PARENT_SELECTOR); | ||
|
|
||
Tucchhaa marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| await createWidget('dxScheduler', { | ||
| dataSource: [ | ||
| { | ||
| text: 'Appointment 1', | ||
| startDate: new Date(2015, 1, 9, 8), | ||
| endDate: new Date(2015, 1, 9, 9), | ||
| }, | ||
| { | ||
| text: 'Appointment 2', | ||
| startDate: new Date(2015, 1, 9, 10), | ||
| endDate: new Date(2015, 1, 9, 11), | ||
| }, | ||
| { | ||
| text: 'Appointment 3', | ||
| startDate: new Date(2015, 1, 9, 12), | ||
| endDate: new Date(2015, 1, 9, 13), | ||
| }, | ||
| ], | ||
| height: 300, | ||
| currentView: 'day', | ||
| currentDate: new Date(2015, 1, 9), | ||
| }); | ||
| }).after(async () => { | ||
| ClientFunction((selector) => { | ||
| const parent = document.querySelector(selector) as HTMLElement; | ||
| parent.style.height = ''; | ||
| })(PARENT_SELECTOR); | ||
| }); | ||
Tucchhaa marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| test('Document should not scroll on \'Home\' press when appointment is focused', async (t) => { | ||
| const scheduler = new Scheduler(SCHEDULER_SELECTOR); | ||
| const initialScrollTop = 40; | ||
|
|
||
| await ClientFunction( | ||
| (scrollTop) => { document.body.scrollTop = scrollTop; }, | ||
| )(initialScrollTop); | ||
Tucchhaa marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| await t | ||
| .click(scheduler.getAppointment('Appointment 1').element) | ||
| .pressKey('Home'); | ||
|
|
||
| const scrollTop = await ClientFunction(() => document.body.scrollTop)(); | ||
|
|
||
| await t.expect(scrollTop).eql(initialScrollTop); | ||
| }).before(async () => { | ||
| ClientFunction((selector) => { | ||
| const parent = document.querySelector(selector) as HTMLElement; | ||
| parent.style.height = '2000px'; | ||
| })(PARENT_SELECTOR); | ||
|
|
||
| await createWidget('dxScheduler', { | ||
| dataSource: [ | ||
| { | ||
| text: 'Appointment 1', | ||
| startDate: new Date(2015, 1, 9, 8), | ||
| endDate: new Date(2015, 1, 9, 9), | ||
| }, | ||
| { | ||
| text: 'Appointment 2', | ||
| startDate: new Date(2015, 1, 9, 10), | ||
| endDate: new Date(2015, 1, 9, 11), | ||
| }, | ||
| { | ||
| text: 'Appointment 3', | ||
| startDate: new Date(2015, 1, 9, 12), | ||
| endDate: new Date(2015, 1, 9, 13), | ||
| }, | ||
| ], | ||
| height: 300, | ||
| currentView: 'day', | ||
| currentDate: new Date(2015, 1, 9), | ||
| }); | ||
| }).after(async () => { | ||
| ClientFunction((selector) => { | ||
| const parent = document.querySelector(selector) as HTMLElement; | ||
| parent.style.height = ''; | ||
| })(PARENT_SELECTOR); | ||
| }); | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.