From 7bb4a0c7fc06d9093a869b0f7778fd99257e4ac1 Mon Sep 17 00:00:00 2001 From: Sarah Higley Date: Mon, 1 Jun 2026 15:53:46 -0700 Subject: [PATCH 1/3] fix: Escape in an open Combobox or Dropdown does not trigger tabster actions --- .../src/components/Combobox/Combobox.test.tsx | 36 +++++++++++++++++++ .../__snapshots__/Combobox.test.tsx.snap | 2 ++ .../__snapshots__/Dropdown.test.tsx.snap | 2 ++ .../library/src/utils/useTriggerSlot.ts | 20 ++++++++++- 4 files changed, 59 insertions(+), 1 deletion(-) diff --git a/packages/react-components/react-combobox/library/src/components/Combobox/Combobox.test.tsx b/packages/react-components/react-combobox/library/src/components/Combobox/Combobox.test.tsx index bb9054a841c8a..a7ac23f92c046 100644 --- a/packages/react-components/react-combobox/library/src/components/Combobox/Combobox.test.tsx +++ b/packages/react-components/react-combobox/library/src/components/Combobox/Combobox.test.tsx @@ -8,6 +8,7 @@ import { isConformant } from '../../testing/isConformant'; import { resetIdsForTests } from '@fluentui/react-utilities'; import { comboboxClassNames } from './useComboboxStyles.styles'; import type { ComboboxProps } from '@fluentui/react-combobox'; +import { getTabsterAttribute } from 'tabster'; describe('Combobox', () => { beforeEach(() => { @@ -1026,6 +1027,41 @@ describe('Combobox', () => { expect(listbox.getAttribute('aria-labelledby')).toEqual(null); }); + it('should update the tabster escape ignore attribute based on open state', () => { + const tabsterOpenAttr = getTabsterAttribute( + { + focusable: { + ignoreKeydown: { Escape: true }, + }, + }, + true, + ); + const tabsterClosedAttr = getTabsterAttribute( + { + focusable: { + ignoreKeydown: { Escape: false }, + }, + }, + true, + ); + + const { getByRole } = render( + + + + + , + ); + const combobox = getByRole('combobox'); + + expect(combobox.getAttribute('data-tabster')).toMatch(tabsterClosedAttr); + + // open + userEvent.click(getByRole('combobox')); + + expect(combobox.getAttribute('data-tabster')).toMatch(tabsterOpenAttr); + }); + describe('clearable', () => { it('clears the selection on a button click', () => { const { getByText, getByRole } = render( diff --git a/packages/react-components/react-combobox/library/src/components/Combobox/__snapshots__/Combobox.test.tsx.snap b/packages/react-components/react-combobox/library/src/components/Combobox/__snapshots__/Combobox.test.tsx.snap index 38c9549a86f22..a32d7c2e29f26 100644 --- a/packages/react-components/react-combobox/library/src/components/Combobox/__snapshots__/Combobox.test.tsx.snap +++ b/packages/react-components/react-combobox/library/src/components/Combobox/__snapshots__/Combobox.test.tsx.snap @@ -8,6 +8,7 @@ exports[`Combobox renders a default state 1`] = ` Date: Mon, 1 Jun 2026 15:54:18 -0700 Subject: [PATCH 2/3] change file --- ...eact-combobox-fe5d376c-8505-4d92-a4dc-a8d66b74a826.json | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 change/@fluentui-react-combobox-fe5d376c-8505-4d92-a4dc-a8d66b74a826.json diff --git a/change/@fluentui-react-combobox-fe5d376c-8505-4d92-a4dc-a8d66b74a826.json b/change/@fluentui-react-combobox-fe5d376c-8505-4d92-a4dc-a8d66b74a826.json new file mode 100644 index 0000000000000..244f1fe7a7926 --- /dev/null +++ b/change/@fluentui-react-combobox-fe5d376c-8505-4d92-a4dc-a8d66b74a826.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "fix: Escape in an open Combobox or Dropdown does not trigger tabster actions", + "packageName": "@fluentui/react-combobox", + "email": "sarah.higley@microsoft.com", + "dependentChangeType": "patch" +} From 96f0e0b0cabdeb3bbd7779f800b60474cb56fb2d Mon Sep 17 00:00:00 2001 From: Sarah Higley Date: Mon, 1 Jun 2026 16:26:32 -0700 Subject: [PATCH 3/3] update tagpicker snapshots --- .../TagPickerButton/__snapshots__/TagPickerButton.test.tsx.snap | 1 + .../TagPickerInput/__snapshots__/TagPickerInput.test.tsx.snap | 1 + 2 files changed, 2 insertions(+) diff --git a/packages/react-components/react-tag-picker/library/src/components/TagPickerButton/__snapshots__/TagPickerButton.test.tsx.snap b/packages/react-components/react-tag-picker/library/src/components/TagPickerButton/__snapshots__/TagPickerButton.test.tsx.snap index fda25e74cd6fa..f0ef4354fe640 100644 --- a/packages/react-components/react-tag-picker/library/src/components/TagPickerButton/__snapshots__/TagPickerButton.test.tsx.snap +++ b/packages/react-components/react-tag-picker/library/src/components/TagPickerButton/__snapshots__/TagPickerButton.test.tsx.snap @@ -5,6 +5,7 @@ exports[`TagPickerButton renders a default state 1`] = `