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.
https://sa11y.netlify.app
Other
280 stars 43 forks source link

Error for HTML in "Ignore elements within links" #63

Closed HUisHU-Christian closed 1 year ago

HUisHU-Christian commented 1 year ago

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?

brianteeman commented 1 year ago

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

HUisHU-Christian commented 1 year ago

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.

HUisHU-Christian commented 1 year ago

Closed as it is a duplicate of https://github.com/ryersondmp/sa11y-wp/issues/3