-
-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
page.evaluate: TypeError: Cannot read properties of undefined (reading 'run') #65
Comments
Hi @thomasfischer-his, there is actually not a container for kayle. The pagemind container pulls in kayle for the audits. I ran kayle locally and was able to get the audit fine. The issue looks like a custom runner maybe was added through the node env? If so the system for pagemind does not have support for this at the moment. Example of the data below with {
documentTitle: 'Bolagsverket',
pageUrl: 'https://www.bolagsverket.se/',
issues: [
{
context: '<p class="normal">Har du fått mejl med ett ”erbjud...</p>',
selector: '#svid12_41e70ebc18922543366b0>:nth-child(2)>:nth-child(2)',
code: 'WCAG2AA.Principle1.Guideline1_4.1_4_3.G18.Fail',
type: 'error',
typeCode: 1,
message: 'This element has insufficient contrast at this conformance level. Expected a contrast ratio of at least 4.5:1, but text in this element has a contrast ratio of 1.41:1. Recommendation: change background to #fdfeff.',
runner: 'htmlcs',
recurrence: 0
},
{
context: '<p class="normal">Har du fått mejl med ett ”erbjud...</p>',
selector: '#svid12_41e70ebc18922543366b0>:nth-child(2)>:nth-child(2)',
code: 'color-contrast',
type: 'error',
typeCode: 1,
message: 'Elements must have sufficient color contrast',
runner: 'axe',
runnerExtras: [Object],
recurrence: 0
},
{
context: '<img alt="" class="sv-noborder c2186" srcset="/images/18.6c1c4b4a17f538595df1c76/1657622904215/x160p/arsredovisningar.jpg 160w, /images/18.6c1c4b4a17f538595df1c76/1657622904215/arsredovisningar.jpg 309w" sizes="100vw" src="/images/18.6c1c4b4a17f538595...',
selector: '#svid12_2733cf65187efcf5c7e12e4b>:nth-child(2)',
code: 'WCAG2AA.Principle1.Guideline1_1.1_1_1.H67.2',
type: 'warning',
typeCode: 2,
message: 'Img element is marked so that it is ignored by Assistive Technology.',
runner: 'htmlcs',
recurrence: 0
},
{
context: '<a href="#sidans-innehall" class="lp-skip-to-content">Hoppa till innehåll</a>',
selector: '#svid12_46f4138717c599ee403ab94d>:nth-child(3)>:nth-child(1)>:nth-child(1)',
code: 'WCAG2AA.Principle1.Guideline1_4.1_4_3.G18.Abs',
type: 'warning',
typeCode: 2,
message: 'This element is absolutely positioned and the background color can not be determined. Ensure the contrast ratio between the text and all covered parts of the background are at least 4.5:1.',
runner: 'htmlcs',
recurrence: 0
},
{
context: '<img alt="" class="sv-noborder c2186" srcset="/images/18.2733cf65187efcf5c7e126b1/1695814140059/x160p/inga-otmalm-ebba-busch-puff.jpg 160w, /images/18.2733cf65187efcf5c7e126b1/1695814140059/inga-otmalm-ebba-busch-puff.jpg 309w" sizes="100vw" src="/ima...',
selector: '#svid12_2733cf65187efcf5c7e11cf8>:nth-child(2)',
code: 'WCAG2AA.Principle1.Guideline1_1.1_1_1.H67.2',
type: 'warning',
typeCode: 2,
message: 'Img element is marked so that it is ignored by Assistive Technology.',
runner: 'htmlcs',
recurrence: 0
},
{
context: '<span class="env-assistive-text"> Länk till annan webbplats.</span>',
selector: '#svid12_46f4138717c599ee403a3457>:nth-child(2)>:nth-child(4)>:nth-child(1)>:nth-child(1)',
code: 'WCAG2AA.Principle1.Guideline1_4.1_4_3.G18.Abs',
type: 'warning',
typeCode: 2,
message: 'This element is absolutely positioned and the background color can not be determined. Ensure the contrast ratio between the text and all covered parts of the background are at least 4.5:1.',
runner: 'htmlcs',
recurrence: 1
},
{
context: '<div id="svid10_46f4138717c599ee403a7ab0" class="sv-layout lp-overlay-page" aria-hidden="false"><div id="svid94_46f4138717c599ee...</div>',
selector: '#svid10_46f4138717c599ee403a7ab0',
code: 'WCAG2AA.Principle1.Guideline1_3.1_3_1.H48.2',
type: 'warning',
typeCode: 2,
message: 'This content looks like it is simulating an ordered list using plain text. If so, marking up this content with an ol element would add proper structure information to the document.',
runner: 'htmlcs',
recurrence: 0
},
{
context: '<img alt="" class="sv-noborder c2186" srcset="/images/18.6535432417e0f2071275d44e/1643275283617/x160p/lediga-jobb.jpg 160w, /images/18.6535432417e0f2071275d44e/1643275283617/lediga-jobb.jpg 309w" sizes="100vw" src="/images/18.6535432417e0f2071275d44e/...',
selector: '#svid12_2733cf65187efcf5c7e11cf3>:nth-child(2)',
code: 'WCAG2AA.Principle1.Guideline1_1.1_1_1.H67.2',
type: 'warning',
typeCode: 2,
message: 'Img element is marked so that it is ignored by Assistive Technology.',
runner: 'htmlcs',
recurrence: 0
},
{
context: '<h2 class="subheading sv-text-align-center" id="h-Vadvilldugora">Vad vill du göra?</h2>',
selector: '#h-Vadvilldugora',
code: 'color-contrast',
type: 'warning',
typeCode: 2,
message: 'Elements must have sufficient color contrast',
runner: 'axe',
runnerExtras: [Object],
recurrence: 0
},
{
context: '<button class="lp-toggle__trigger-button" source-id="lp0_12_46f4138717c599ee403a3457-toggler" aria-controls="lp0_12_46f4138717c599ee403a3457-content" aria-expanded="false">Starta företag eller ändra uppgi...</button>',
selector: '#lp0_12_46f4138717c599ee403a3457-toggler>:nth-child(1)',
code: 'color-contrast',
type: 'warning',
typeCode: 2,
message: 'Elements must have sufficient color contrast',
runner: 'axe',
runnerExtras: [Object],
recurrence: 0
},
{
context: '<button class="lp-toggle__trigger-button" source-id="lp1_12_46f4138717c599ee403a3457-toggler" aria-controls="lp1_12_46f4138717c599ee403a3457-content" aria-expanded="false">Söka ärende eller se om årsredov...</button>',
selector: '#lp1_12_46f4138717c599ee403a3457-toggler>:nth-child(1)',
code: 'color-contrast',
type: 'warning',
typeCode: 2,
message: 'Elements must have sufficient color contrast',
runner: 'axe',
runnerExtras: [Object],
recurrence: 0
},
{
context: '<button class="lp-toggle__trigger-button" source-id="lp2_12_46f4138717c599ee403a3457-toggler" aria-controls="lp2_12_46f4138717c599ee403a3457-content" aria-expanded="false">Anmäla eller söka verklig huvudm...</button>',
selector: '#lp2_12_46f4138717c599ee403a3457-toggler>:nth-child(1)',
code: 'color-contrast',
type: 'warning',
typeCode: 2,
message: 'Elements must have sufficient color contrast',
runner: 'axe',
runnerExtras: [Object],
recurrence: 0
},
{
context: '<a href="https://sokarende.bolagsverket.se/soka/?betala" class="normal">Betala ett redan inskickat ärend...</a>',
selector: '#svid12_46f4138717c599ee403a3457>:nth-child(2)>:nth-child(4)>:nth-child(1)',
code: 'color-contrast',
type: 'warning',
typeCode: 2,
message: 'Elements must have sufficient color contrast',
runner: 'axe',
runnerExtras: [Object],
recurrence: 0
},
{
context: '<a href="/foretag/aktiebolag/drivaaktiebolag/okaellerminskaaktiekapitalet.585.html" class="normal">Öka eller minska aktiekapitalet</a>',
selector: '#svid12_46f4138717c599ee403a3457>:nth-child(2)>:nth-child(5)>:nth-child(1)',
code: 'color-contrast',
type: 'warning',
typeCode: 2,
message: 'Elements must have sufficient color contrast',
runner: 'axe',
runnerExtras: [Object],
recurrence: 0
},
{
context: '<a href="https://foretagsinfo.bolagsverket.se/" class="normal">Köpa registreringsbevis<span cla...</a>',
selector: '#svid12_46f4138717c599ee403a3457>:nth-child(2)>:nth-child(6)>:nth-child(1)',
code: 'color-contrast',
type: 'warning',
typeCode: 2,
message: 'Elements must have sufficient color contrast',
runner: 'axe',
runnerExtras: [Object],
recurrence: 0
},
{
context: '<a href="/sjalvservice/etjanster/lamnainarsredovisningendigitalt.1663.html" class="normal">Lämna in årsredovisningen digita...</a>',
selector: '#svid12_46f4138717c599ee403a3457>:nth-child(2)>:nth-child(7)>:nth-child(1)',
code: 'color-contrast',
type: 'warning',
typeCode: 2,
message: 'Elements must have sufficient color contrast',
runner: 'axe',
runnerExtras: [Object],
recurrence: 0
},
{
context: '<button class="lp-toggle__trigger-button" source-id="lp7_12_46f4138717c599ee403a3457-toggler" aria-controls="lp7_12_46f4138717c599ee403a3457-content" aria-expanded="false">Ladda ner ditt registreringsbevi...</button>',
selector: '#lp7_12_46f4138717c599ee403a3457-toggler>:nth-child(1)',
code: 'color-contrast',
type: 'warning',
typeCode: 2,
message: 'Elements must have sufficient color contrast',
runner: 'axe',
runnerExtras: [Object],
recurrence: 0
}
],
meta: { errorCount: 2, warningCount: 16, noticeCount: 0, accessScore: 80 },
automateable: { missingAltIndexs: [] }
} |
What I am using is 'docker.io/a11ywatch/a11ywatch', makes use of some kayle NPM packages, and the error message suggested that kayle is involved in the issue. I am actually using podman (doubt that this is a problem, as I get reasonable output for other URLs), and the complete invocation is: podman run --rm --interactive --add-host chrome:127.0.0.2 -p 3280:3280/tcp -p 50050:50050/tcp -p 50051:50051/tcp -p 50052:50052/tcp -p 50053:50053/tcp -p 50054:50054/tcp -p 9222:9222/tcp docker.io/a11ywatch/a11ywatch To be more clear which package versions I am using, here is the output of podman run --rm --interactive --tty --workdir /usr/src/app docker.io/a11ywatch/a11ywatch npm list | grep -iE 'axe.?core|html.?code.?sniffer|html.?cs|a11y|kayle'
I have neither touched the code, added or removed packages, nor made any configuration changes.
My curl invocation does not specify any runner, but even if I add |
@thomasfischer-his is this happening for every URL? |
No, right now bolagsverket.se is the only page where I can reproduce this problem. I just tested a few other domains, but for those everything is fine, i.e. a list of accessibility issues get reported and no error messages in the container's console. |
@thomasfischer-his 2023-10-09 08:52:48 navigating to "https://bolagsverket.se/", waiting until "load"
2023-10-09 08:52:48 ============================================================
2023-10-09 08:52:48 at gatherPages (/usr/src/app/server/src/core/controllers/gather-pages.ts:119:16)
2023-10-09 08:52:48 at Object.gather (/usr/src/app/server/src/proto/grpc-server.ts:28:20) {
2023-10-09 08:52:48 name: 'Error'
2023-10-09 08:52:48 } The reason the system runs fine when simply using There might be room to disable |
Going to transfer the issue to the |
@thomasfischer-his this is now fixed via If using the the sidecar use the env variable |
Running the latest a11ywatch/kayle instance in a container as pulled from hub.docker.com, an exception (?) is raised when visiting certain webpages (example: https://www.bolagsverket.se/)
Curl invocation to trigger a scan:
Inside the container, the following output is generated inside the container following the curl invocation:
The JSON output returned from the curl invocation does not any accessibility issues on the visited page. A duration of 0 suggests no check was done at all.
I am quite certain that my a11ywatch/kayle/curl setup is working correctly otherwise, as I get back sane results for other URLs.
The text was updated successfully, but these errors were encountered: