Repository: storybook
Issue: [Bug]: a11y error, accessibility tab don't work
Labels: bug,help wanted,compatibility with other tools,addon: a11y,windows,sev:S3

### Describe the bug

I've followed instructions to add "storybook-addon-a11y" to my project. Now it shows "Accessibility" tab correctly, but when I move into it I've an error:

```
The accessibility scan encountered an error.
{"name":"TypeError","stack":"cacheSelector@http://localhost:6006/vendors-node_modules_axe-core_axe_js.iframe.bundle.js:16803:19\ncacheNodeSelectors@http://localhost:6006/vendors-node_modules_axe-core_axe_js.iframe.bundle.js:16812:20\ncreateNode@http://localhost:6006/vendors-node_modules_axe-core_axe_js.iframe.bundle.js:16848:25\nflattenTree@http://localhost:6006/vendors-node_modules_axe-core_axe_js.iframe.bundle.js:16892:22\n_getFlattenedTree@http://localhost:6006/vendors-node_modules_axe-core_axe_js.iframe.bundle.js:16832:29\nContext@http://localhost:6006/vendors-node_modules_axe-core_axe_js.iframe.bundle.js:17360:77\nrunRules@http://localhost:6006/vendors-node_modules_axe-core_axe_js.iframe.bundle.js:27422:19\nrun4@http://localhost:6006/vendors-node_modules_axe-core_axe_js.iframe.bundle.js:27684:11\nrun/_ref2<@http://localhost:6006/vendors-node_modules_storybook_addon-a11y_dist_preview_mjs-node_modules_storybook_addon-docs_-a802f3.iframe.bundle.js:66085:34\nasyncGeneratorStep@http://localhost:6006/vendors-node_modules_storybook_addon-a11y_dist_preview_mjs-node_modules_storybook_addon-docs_-a802f3.iframe.bundle.js:109516:24\n_next@http://localhost:6006/vendors-node_modules_storybook_addon-a11y_dist_preview_mjs-node_modules_storybook_addon-docs_-a802f3.iframe.bundle.js:109535:27\n./node_modules/zone.js/dist/zone.js/</</_ZoneDelegate</_ZoneDelegate.prototype.invoke@http://localhost:6006/vendors-node_modules_storybook_addon-a11y_dist_preview_mjs-node_modules_storybook_addon-docs_-a802f3.iframe.bundle.js:106492:160\n./node_modules/zone.js/dist/zone.js/</</Zone</Zone.prototype.run@http://localhost:6006/vendors-node_modules_storybook_addon-a11y_dist_preview_mjs-node_modules_storybook_addon-docs_-a802f3.iframe.bundle.js:106263:37\nscheduleResolveOrReject/<@http://localhost:6006/vendors-node_modules_storybook_addon-a11y_dist_preview_mjs-node_modules_storybook_addon-docs_-a802f3.iframe.bundle.js:107424:28\n./node_modules/zone.js/dist/zone.js/</</_ZoneDelegate</_ZoneDelegate.prototype.invokeTask@http://localhost:6006/vendors-node_modules_storybook_addon-a11y_dist_preview_mjs-node_modules_storybook_addon-docs_-a802f3.iframe.bundle.js:106519:173\n./node_modules/zone.js/dist/zone.js/</</Zone</Zone.prototype.runTask@http://localhost:6006/vendors-node_modules_storybook_addon-a11y_dist_preview_mjs-node_modules_storybook_addon-docs_-a802f3.iframe.bundle.js:106312:39\ndrainMicroTaskQueue@http://localhost:6006/vendors-node_modules_storybook_addon-a11y_dist_preview_mjs-node_modules_storybook_addon-docs_-a802f3.iframe.bundle.js:106700:25\n"}
```

### To Reproduce

Just added added a11y addon to my clean angular 15 project.
Angular CLI 15.2.9

This is issue for **FIREFOX**. On Chrome/Edge it's working.

### System

```bash
System:
    OS: Windows 10 10.0.19043
    CPU: (12) x64 Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz
  Binaries:
    Node: 18.17.1 - C:\Program Files\nodejs\node.EXE
    npm: 9.6.7 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Edge: Spartan (44.19041.1266.0), Chromium (116.0.1938.81)
  npmPackages:
    @storybook/addon-a11y: ^7.4.2 => 7.4.2
    @storybook/addon-docs: ^7.4.2 => 7.4.2
    @storybook/addon-essentials: ^7.4.2 => 7.4.2
    @storybook/addon-interactions: ^7.4.2 => 7.4.2
    @storybook/addon-links: ^7.4.2 => 7.4.2
    @storybook/angular: ^7.4.2 => 7.4.2
    @storybook/blocks: ^7.4.2 => 7.4.2
    @storybook/testing-library: ^0.2.1 => 0.2.1
  npmGlobalPackages:
    @storybook/angular: 7.0.0
    @storybook/cli: 7.0.0
```


### Additional context

![e1](https://github.com/storybookjs/storybook/assets/35505953/b9744963-35c6-415e-9086-701c5d345084)
![e2](https://github.com/storybookjs/storybook/assets/35505953/2d7462e3-cf07-431f-923d-f72feaf032bf)