You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I’m encountering an issue with aria-labelledby in Testing Library when it references the id of an element with role="combobox". The accessible name is not being resolved as expected in this case.
The input's accessible name should be Label Value because aria-labelledby references an element with id="trigger", which contains accessible children with id="label" and id="value".
Observed behavior:
The accessible name is not resolved correctly, causing the test to fail.
Additional context:
It seems that this issue occurs because role="combobox" affects how aria-labelledby resolves the accessible name. According to the ARIA specification, a combobox should be associated with additional controls, such as a listbox or a textbox. However, this scenario should still be considered valid.
Question:
Is this behavior expected given the current implementation, or is it a bug in how aria-labelledby resolves when referencing a combobox?
Versions:
React Testing Library: <14.3.1>
DOM Testing Library: <9.3.4>
Dom Accessibility Api: <0.5.16>
The text was updated successfully, but these errors were encountered:
Hi,
I’m encountering an issue with
aria-labelledby
in Testing Library when it references the id of an element withrole="combobox"
. The accessible name is not being resolved as expected in this case.Code Example:
Expected behavior:
The input's accessible name should be Label Value because
aria-labelledby
references an element withid="trigger"
, which contains accessible children withid="label"
andid="value"
.Observed behavior:
The accessible name is not resolved correctly, causing the test to fail.
Additional context:
It seems that this issue occurs because role="combobox" affects how aria-labelledby resolves the accessible name. According to the ARIA specification, a combobox should be associated with additional controls, such as a listbox or a textbox. However, this scenario should still be considered valid.
Question:
Is this behavior expected given the current implementation, or is it a bug in how aria-labelledby resolves when referencing a combobox?
Versions:
React Testing Library: <14.3.1>
DOM Testing Library: <9.3.4>
Dom Accessibility Api: <0.5.16>
The text was updated successfully, but these errors were encountered: