Skip to content

fix(aria-input-field-name): skip combobox popups#3886

Merged
WilcoFiers merged 7 commits intodevelopfrom
combobox-popop-no-name
Jan 31, 2023
Merged

fix(aria-input-field-name): skip combobox popups#3886
WilcoFiers merged 7 commits intodevelopfrom
combobox-popop-no-name

Conversation

@WilcoFiers
Copy link
Copy Markdown
Contributor

Closes: #3860

import isFocusable from '../dom/is-focusable';
import { getNodeFromTree } from '../../core/utils';
import AbstractVirtuaNode from '../../core/base/virtual-node/abstract-virtual-node';
import AbstractVirtualNode from '../../core/base/virtual-node/abstract-virtual-node';
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Found a typo


const isCombobox = node => node && getRole(node) === 'combobox';

function nearestParentWithRole(vNode) {
Copy link
Copy Markdown
Contributor Author

@WilcoFiers WilcoFiers Jan 25, 2023

Choose a reason for hiding this comment

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

We were using closest before, but this is more accurate and faster. It's not perfect though. We should really have a method that can tell you the owner. I spent more time on this PR than I expected to already, and didn't want to bloat this further. I opened a tech debt ticket: #3888

}

if (!virtualNode.actualNode) {
throw new Error('Unable to determine combobox popup without an actualNode');
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I didn't think we needed additional virtualNode tests, but let me know if I missed anything.

@WilcoFiers WilcoFiers marked this pull request as ready for review January 25, 2023 11:49
@WilcoFiers WilcoFiers requested a review from a team as a code owner January 25, 2023 11:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Listbox should not require a name when its used in a combobox pattern

2 participants