Skip to content

Lookup: Fix keyboard navigation (research for T1327208)#33375

Open
marker-dao wants to merge 5 commits intoDevExpress:26_1from
marker-dao:26_1_T1327208_lookup
Open

Lookup: Fix keyboard navigation (research for T1327208)#33375
marker-dao wants to merge 5 commits intoDevExpress:26_1from
marker-dao:26_1_T1327208_lookup

Conversation

@marker-dao
Copy link
Copy Markdown
Contributor

No description provided.

@marker-dao marker-dao self-assigned this Apr 22, 2026
@marker-dao marker-dao changed the title research Lookup: Fix keyboard navigation (research for T1327208) Apr 22, 2026
@marker-dao marker-dao marked this pull request as ready for review April 22, 2026 16:17
@marker-dao marker-dao requested a review from a team as a code owner April 22, 2026 16:17
Copilot AI review requested due to automatic review settings April 22, 2026 16:17
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates DevExtreme’s internal dxLookup/DropDownList behavior to improve keyboard navigation and focus handling, and adjusts the jQuery playground page to reproduce/inspect the behavior.

Changes:

  • Propagate focusStateEnabled into Lookup popup toolbar buttons and adjust focus cleanup on search box blur.
  • Make Lookup list tabIndex depend on searchEnabled (intended to keep focus in the search box when search is enabled).
  • Propagate focusStateEnabled to the underlying List without desktop-only gating in DropDownList.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
packages/devextreme/playground/jquery.html Switches the playground widget from dxButton to dxLookup for keyboard-navigation research.
packages/devextreme/js/__internal/ui/m_lookup.ts Updates focus/keyboard behavior for the Lookup popup (toolbar button focusStateEnabled, list tabIndex logic, focusedElement reset on search blur).
packages/devextreme/js/__internal/ui/drop_down_editor/m_drop_down_list.ts Adjusts List configuration/option propagation for focusStateEnabled and includes formatting cleanups.

Comment thread packages/devextreme/js/__internal/ui/m_lookup.ts Outdated
@marker-dao marker-dao force-pushed the 26_1_T1327208_lookup branch from 2be5899 to 358e04b Compare April 23, 2026 14:48
Copilot AI review requested due to automatic review settings April 23, 2026 14:50
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates DevExtreme’s Lookup/DropDownList focus behavior to improve keyboard navigation and focus management (per T1327208 research), and adjusts QUnit coverage to validate the new focus/tabIndex rules.

Changes:

  • Lookup: make list tabIndex depend on searchEnabled (and update it on runtime changes); clear list focusedElement when the search box loses focus.
  • Lookup: pass focusStateEnabled through to popup toolbar buttons (done/clear/cancel) and add focused/tabIndex regression tests.
  • DropDownList: propagate focusStateEnabled to the inner List on mobile (hover state remains desktop-only) and update related tests.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
packages/devextreme/testing/tests/DevExpress.ui.widgets.editors/lookup.tests.js Adds focus/tabIndex and toolbar focus-state tests; updates ARIA expectations for tabindex when searchEnabled toggles.
packages/devextreme/testing/tests/DevExpress.ui.widgets.editors/dropDownList.tests.js Updates focus-policy tests to reflect list focusStateEnabled propagation on mobile.
packages/devextreme/js/__internal/ui/m_lookup.ts Implements list tabIndex switching based on searchEnabled, clears list focus on search focus-out, and passes focusStateEnabled to toolbar button configs.
packages/devextreme/js/__internal/ui/drop_down_editor/m_drop_down_list.ts Removes desktop-only restriction for list focusStateEnabled propagation and updates option-changed handling accordingly.

Comment on lines 118 to 133
@@ -129,7 +129,7 @@ QUnit.module('focus policy', {
this.instance.option({ hoverStateEnabled: true, focusStateEnabled: true });

assert.notOk(list.option('hoverStateEnabled'), 'hover state should not be changed on mobiles');
assert.notOk(list.option('focusStateEnabled'), 'focus state should not be changed on mobiles');
assert.ok(list.option('focusStateEnabled'), 'focus state should be changed on mobiles');
}
Comment on lines +768 to 776
const { focusStateEnabled, applyButtonText: text } = this.option();

return [
{
shortcut: 'done',
options: {
text,
focusStateEnabled,
onClick: this._applyButtonHandler.bind(this),
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants