storybookjs/storybook

[Bug]: a11y error, accessibility tab don't work

Ouverte

#24 190 ouverte le 15 sept. 2023

 (0 commentaire) (1 réaction) (0 personne assignée)TypeScript (10 058 forks)batch import
addon: a11ybugcompatibility with other toolshelp wantedsev:S3windows

Métriques du dépôt

Stars
 (89 909 étoiles)
Métriques de merge PR
 (Merge moyen 7j 22h) (184 PRs mergées en 30 j)

Description

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

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 e2

Guide contributeur