Use of ShadowRoot feature crashes checker.

Created on 4 August 2023, over 1 year ago
Updated 16 August 2023, over 1 year ago

Problem/Motivation

This was tested in Chrome on Linux. If any selector is put in for the shadow host/shadow root scanning feature. the JS crashes:

editoria11y.min.js?ryvlcc:730 Uncaught TypeError: Cannot read properties of null (reading 'querySelectorAll')
    at editoria11y.min.js?ryvlcc:730:19671
    at Array.forEach (<anonymous>)
    at Ed11y.Ed11y.findElements (editoria11y.min.js?ryvlcc:730:19593)
    at Ed11y.Ed11y.buildElementList (editoria11y.min.js?ryvlcc:730:19833)
    at Ed11y.Ed11y.checkAll (editoria11y.min.js?ryvlcc:730:13376)
    at e (editoria11y.min.js?ryvlcc:730:12537)

looking into the debug this line:

e.matches(Ed11y.options.shadowComponents) && (i[t] = e.shadowRoot.querySelectorAll(`:is(${n})` + s))

is the issue. e.shadowRoot is null. I was attempting to use this to scan inside of hidden accordion panels using a class selector, which the scanner currently seems to skip.

Steps to reproduce

1. add a selector into "Scan inside these Web components"
2. clear site cache
3. load a piece of content
4. scanner button does not appear

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Fixed

Version

2.0

Component

Bugs

Created by

πŸ‡ΊπŸ‡ΈUnited States R_H-L

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024