<!-- * Please fill out this template with all the relevant information so we can understand what's going on and fix the issue. We appreciate bugs filed and PRs submitted! * Please make sure that you are familiar with and follow the Code of Conduct for this project (found in the CODE_OF_CONDUCT.md file). We'll probably ask you to submit the fix (after giving some direction). If you've never done that before, that's great! Check this free short video tutorial to learn how: https://kcd.im/pull-request If this is an issue with the documentation, please file an issue in the docs repo: https://github.com/testing-library/testing-library-docs --> - `@testing-library/jest-dom` version: ^6.6.3 - Testing Framework and version: Vitest (3.0.1) <!-- are you using jest, mocha, puppeteer, ava? And what version? --> - DOM Environment: jsdom 26.0.0 <!-- If you're using jsdom (the default with jest), what version? Otherwise, what browser and version are you running tests in? --> <!-- Keep in mind that if you're using a version of node we don't support that could also be an issue. Check our package.json "engines" file for the supported version. --> ### Relevant code or config: HTML looks like that: ``` <button aria-label="Delete" class="css-18cu5b5" data-rac="" data-testid="delete-button-0" id="react-aria-:r6:" type="button" > <svg fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg" > ... </svg> </button> ``` ### What you did: `await userEvent.click(screen.getByTestId('delete-button-0'));` <!-- What you were doing --> ### What happened: <!-- Please provide the full error message/screenshots/anything --> Since I updated jsdom to 26.0.0 I get `SyntaxError: 'button#react-aria-:r22:.css-ofddhz svg' is not a valid selector`. The id seems to be valid and is generated by react-aria. ### Reproduction: <!-- If possible, please create a repository that reproduces the issue with the minimal amount of code possible. Repository template: https://github.com/testing-library/dom-testing-library-template Or if you can, try to reproduce the issue in StackBlitz. You can fork the one here: https://testing-library.com/new-dtl --> ### Problem description: <!-- Please describe why the current behavior is a problem --> According to react-aria this is a valid id. https://github.com/adobe/react-spectrum/discussions/7624#discussioncomment-11874786 ### Suggested solution: <!-- It's ok if you don't have a suggested solution, but it really helps if you could do a little digging to come up with some suggestion of how to improve things. -->