ryersondmp / sa11y

Sa11y is an accessibility quality assurance tool that visually highlights common accessibility and usability issues. Geared towards content authors, Sa11y straightforwardly identifies errors or warnings at the source with a simple tooltip on how to fix them.

Home Page:https://sa11y.netlify.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error for HTML in "Ignore elements within links"

HUisHU-Christian opened this issue · comments

When I add html code in "Ignore elements within links", it is somehow filtered (only the inner text remains after a save) and the tool stops working (due to a JS error).
Yet it's unclear for me, what the field should contain. Maybe a selector is sufficient here?

and what is the error? you can find it in your browser console

The error depends on what I write into the field. In my case if I write " (öffnet sich in einem neuen Fenster)" as hinted by the description below. I got the error:

Uncaught (in promise) DOMException: Failed to execute 'querySelectorAll' on 'Element': 'noscript, (öffnet sich in einem neuen Fenster) *, (öffnet sich in einem neuen Fenster)' is not a valid selector.
    at e.Sa11y.fnIgnore (http://localhost/kkn/wp-content/plugins/sa11y/assets/src/sa11y.umd.min.js?ver=1:12:14026)
    at http://localhost/kkn/wp-content/plugins/sa11y/assets/src/sa11y.umd.min.js?ver=1:12:42039
    at Array.forEach (<anonymous>)
    at e.Sa11y.checkLinkText (http://localhost/kkn/wp-content/plugins/sa11y/assets/src/sa11y.umd.min.js?ver=1:12:41075)
    at checkAll (http://localhost/kkn/wp-content/plugins/sa11y/assets/src/sa11y.umd.min.js?ver=1:12:22257)

This gives me the hint that it's rather a selector which have to go in there. Thus I reduced it to just ".screen-reader-text" and it seems to work now.

Closed as it is a duplicate of ryersondmp/sa11y-wp#3