-
Notifications
You must be signed in to change notification settings - Fork 789
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
fix(aria-input-field-name): skip combobox popups #3886
Conversation
@@ -3,7 +3,7 @@ import getImplicitRole from './implicit-role'; | |||
import getGlobalAriaAttrs from '../standards/get-global-aria-attrs'; | |||
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'; |
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.
Found a typo
|
||
const isCombobox = node => node && getRole(node) === 'combobox'; | ||
|
||
function nearestParentWithRole(vNode) { |
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.
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'); |
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.
I didn't think we needed additional virtualNode tests, but let me know if I missed anything.
Closes: #3860