Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
koddsson committed Jun 26, 2024
1 parent 194cd49 commit 98d00be
Show file tree
Hide file tree
Showing 52 changed files with 486 additions and 83 deletions.
5 changes: 2 additions & 3 deletions generate-act-tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,6 @@ const rulesToIgnore = [
"off6ek",
"oj04fd",
"ucwvc8",
"ye5d6e",
"bf051a",
];

Expand Down Expand Up @@ -172,9 +171,9 @@ const parser = new DOMParser();
describe("[${ruleId}]${ruleName}", function () {
it("${testcaseTitle} (${exampleURL})", async () => {
const document = parser.parseFromString(\`${html}\`, 'text/html');
const el = parser.parseFromString(\`${html}\`, 'text/html');
const results = (await scan(document.body)).map(({ text, url }) => {
const results = (await scan(el)).map(({ text, url }) => {
return { text, url };
});
Expand Down
7 changes: 5 additions & 2 deletions src/rules/bypass.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,14 @@ export default function (el: Document | Element): AccessibilityError[] {

let hasInstrument = false;

// Loop over all the links and see if there's a instrucment to skip to the main content.
// If there's a link
for (const link of links) {
const target = querySelector(link.getAttribute("href")!, document);
const href = link.getAttribute("href")!;
const target = querySelector(href, document);
if (target?.parentElement?.isSameNode(document.body)) hasInstrument = true;
}
if (hasInstrument) {
if (!hasInstrument) {
errors.push({
element: document.body,
text,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ const parser = new DOMParser();

describe("[c487ae]Link has non-empty accessible name", function () {
it("Passed Example 8 (https://act-rules.github.io/testcases/c487ae/014295a8bd7213fdbd69bc1c8ee44c48268370ec.html)", async () => {
const document = parser.parseFromString(`<!DOCTYPE html> <a href="https://www.w3.org/WAI"><img src="/test-assets/shared/w3c-logo.png" aria-labelledby="id1"/></a>
const el = parser.parseFromString(`<!DOCTYPE html> <a href="https://www.w3.org/WAI"><img src="/test-assets/shared/w3c-logo.png" aria-labelledby="id1"/></a>
<div id="id1">Web Accessibility Initiative (WAI)</div>`, 'text/html');

const results = (await scan(document.body)).map(({ text, url }) => {
const results = (await scan(el)).map(({ text, url }) => {

Check failure on line 11 in tests/act/tests/c487ae/014295a8bd7213fdbd69bc1c8ee44c48268370ec.ts

View workflow job for this annotation

GitHub Actions / Run tests

Argument of type 'Document' is not assignable to parameter of type 'Element'.
return { text, url };
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ const parser = new DOMParser();

describe("[c487ae]Link has non-empty accessible name", function () {
it("Passed Example 5 (https://act-rules.github.io/testcases/c487ae/03653844ceb8f6cd95af81672123ea98323ce5c8.html)", async () => {
const document = parser.parseFromString(`<!DOCTYPE html> <a href="https://www.w3.org/WAI" title="Web Accessibility Initiative"
const el = parser.parseFromString(`<!DOCTYPE html> <a href="https://www.w3.org/WAI" title="Web Accessibility Initiative"
><img src="/test-assets/shared/w3c-logo.png" alt=""
/></a>`, 'text/html');

const results = (await scan(document.body)).map(({ text, url }) => {
const results = (await scan(el)).map(({ text, url }) => {

Check failure on line 12 in tests/act/tests/c487ae/03653844ceb8f6cd95af81672123ea98323ce5c8.ts

View workflow job for this annotation

GitHub Actions / Run tests

Argument of type 'Document' is not assignable to parameter of type 'Element'.
return { text, url };
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ const parser = new DOMParser();

describe("[c487ae]Link has non-empty accessible name", function () {
it("Passed Example 4 (https://act-rules.github.io/testcases/c487ae/0d7a7862c5b414c272f1713c341d821f5249a15d.html)", async () => {
const document = parser.parseFromString(`<!DOCTYPE html> <a href="https://www.w3.org/WAI"
const el = parser.parseFromString(`<!DOCTYPE html> <a href="https://www.w3.org/WAI"
><img src="/test-assets/shared/w3c-logo.png" aria-label="Web Accessibility Initiative"
/></a>`, 'text/html');

const results = (await scan(document.body)).map(({ text, url }) => {
const results = (await scan(el)).map(({ text, url }) => {

Check failure on line 12 in tests/act/tests/c487ae/0d7a7862c5b414c272f1713c341d821f5249a15d.ts

View workflow job for this annotation

GitHub Actions / Run tests

Argument of type 'Document' is not assignable to parameter of type 'Element'.
return { text, url };
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ const parser = new DOMParser();

describe("[c487ae]Link has non-empty accessible name", function () {
it("Failed Example 1 (https://act-rules.github.io/testcases/c487ae/113298e42bd5a240371affac3747a470c617610b.html)", async () => {
const document = parser.parseFromString(`<!DOCTYPE html> <a href="http://www.w3.org/WAI"></a>`, 'text/html');
const el = parser.parseFromString(`<!DOCTYPE html> <a href="http://www.w3.org/WAI"></a>`, 'text/html');

const results = (await scan(document.body)).map(({ text, url }) => {
const results = (await scan(el)).map(({ text, url }) => {

Check failure on line 10 in tests/act/tests/c487ae/113298e42bd5a240371affac3747a470c617610b.ts

View workflow job for this annotation

GitHub Actions / Run tests

Argument of type 'Document' is not assignable to parameter of type 'Element'.
return { text, url };
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ const parser = new DOMParser();

describe("[c487ae]Link has non-empty accessible name", function () {
it("Passed Example 10 (https://act-rules.github.io/testcases/c487ae/1752fb0c94ce17c6557a7e498c6e9a87c6a943ea.html)", async () => {
const document = parser.parseFromString(`<!DOCTYPE html> <img src="/test-assets/c487ae/planets.jpg" width="145" height="126" alt="Planets" usemap="#planetmap" />
const el = parser.parseFromString(`<!DOCTYPE html> <img src="/test-assets/c487ae/planets.jpg" width="145" height="126" alt="Planets" usemap="#planetmap" />
<map name="planetmap">
<area shape="rect" coords="0,0,30,100" href="sun.htm" alt="Sun" />
</map>`, 'text/html');

const results = (await scan(document.body)).map(({ text, url }) => {
const results = (await scan(el)).map(({ text, url }) => {

Check failure on line 14 in tests/act/tests/c487ae/1752fb0c94ce17c6557a7e498c6e9a87c6a943ea.ts

View workflow job for this annotation

GitHub Actions / Run tests

Argument of type 'Document' is not assignable to parameter of type 'Element'.
return { text, url };
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ const parser = new DOMParser();

describe("[c487ae]Link has non-empty accessible name", function () {
it("Passed Example 7 (https://act-rules.github.io/testcases/c487ae/2917b821f0e317de992cad191ed67aeedb9f34c9.html)", async () => {
const document = parser.parseFromString(`<!DOCTYPE html> <a href="https://www.w3.org/WAI"
const el = parser.parseFromString(`<!DOCTYPE html> <a href="https://www.w3.org/WAI"
><img src="/test-assets/shared/w3c-logo.png" alt="" />Web Accessibility Initiative (WAI)</a
>`, 'text/html');

const results = (await scan(document.body)).map(({ text, url }) => {
const results = (await scan(el)).map(({ text, url }) => {

Check failure on line 12 in tests/act/tests/c487ae/2917b821f0e317de992cad191ed67aeedb9f34c9.ts

View workflow job for this annotation

GitHub Actions / Run tests

Argument of type 'Document' is not assignable to parameter of type 'Element'.
return { text, url };
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ const parser = new DOMParser();

describe("[c487ae]Link has non-empty accessible name", function () {
it("Failed Example 7 (https://act-rules.github.io/testcases/c487ae/2bdb0351ae2e82f05cfa15198ca0a353974f6278.html)", async () => {
const document = parser.parseFromString(`<!DOCTYPE html> <a href="https://www.w3.org/WAI"><img src="/test-assets/shared/w3c-logo.png" aria-labelledby="id1"/></a>`, 'text/html');
const el = parser.parseFromString(`<!DOCTYPE html> <a href="https://www.w3.org/WAI"><img src="/test-assets/shared/w3c-logo.png" aria-labelledby="id1"/></a>`, 'text/html');

const results = (await scan(document.body)).map(({ text, url }) => {
const results = (await scan(el)).map(({ text, url }) => {

Check failure on line 10 in tests/act/tests/c487ae/2bdb0351ae2e82f05cfa15198ca0a353974f6278.ts

View workflow job for this annotation

GitHub Actions / Run tests

Argument of type 'Document' is not assignable to parameter of type 'Element'.
return { text, url };
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const parser = new DOMParser();

describe("[c487ae]Link has non-empty accessible name", function () {
it("Passed Example 9 (https://act-rules.github.io/testcases/c487ae/2c58ea9a68f5bf34cabb07059af1a533be96c720.html)", async () => {
const document = parser.parseFromString(`<!DOCTYPE html> <html>
const el = parser.parseFromString(`<!DOCTYPE html> <html>
<style>
.offScreenLink {
position: absolute;
Expand All @@ -18,7 +18,7 @@ describe("[c487ae]Link has non-empty accessible name", function () {
</body>
</html>`, 'text/html');

const results = (await scan(document.body)).map(({ text, url }) => {
const results = (await scan(el)).map(({ text, url }) => {

Check failure on line 21 in tests/act/tests/c487ae/2c58ea9a68f5bf34cabb07059af1a533be96c720.ts

View workflow job for this annotation

GitHub Actions / Run tests

Argument of type 'Document' is not assignable to parameter of type 'Element'.
return { text, url };
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ const parser = new DOMParser();

describe("[c487ae]Link has non-empty accessible name", function () {
it("Passed Example 1 (https://act-rules.github.io/testcases/c487ae/34c82462f976ebaaa5f68fc0f3f519832614e182.html)", async () => {
const document = parser.parseFromString(`<!DOCTYPE html> <a href="https://www.w3.org/WAI"> Web Accessibility Initiative (WAI) </a>`, 'text/html');
const el = parser.parseFromString(`<!DOCTYPE html> <a href="https://www.w3.org/WAI"> Web Accessibility Initiative (WAI) </a>`, 'text/html');

const results = (await scan(document.body)).map(({ text, url }) => {
const results = (await scan(el)).map(({ text, url }) => {

Check failure on line 10 in tests/act/tests/c487ae/34c82462f976ebaaa5f68fc0f3f519832614e182.ts

View workflow job for this annotation

GitHub Actions / Run tests

Argument of type 'Document' is not assignable to parameter of type 'Element'.
return { text, url };
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ const parser = new DOMParser();

describe("[c487ae]Link has non-empty accessible name", function () {
it("Failed Example 2 (https://act-rules.github.io/testcases/c487ae/43516ed6280651bc0bb5c4fe83ba5312bca2b58b.html)", async () => {
const document = parser.parseFromString(`<!DOCTYPE html> <a href="https://www.w3.org/WAI"><img src="/test-assets/shared/w3c-logo.png" alt=""/></a>`, 'text/html');
const el = parser.parseFromString(`<!DOCTYPE html> <a href="https://www.w3.org/WAI"><img src="/test-assets/shared/w3c-logo.png" alt=""/></a>`, 'text/html');

const results = (await scan(document.body)).map(({ text, url }) => {
const results = (await scan(el)).map(({ text, url }) => {

Check failure on line 10 in tests/act/tests/c487ae/43516ed6280651bc0bb5c4fe83ba5312bca2b58b.ts

View workflow job for this annotation

GitHub Actions / Run tests

Argument of type 'Document' is not assignable to parameter of type 'Element'.
return { text, url };
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ const parser = new DOMParser();

describe("[c487ae]Link has non-empty accessible name", function () {
it("Failed Example 5 (https://act-rules.github.io/testcases/c487ae/51db96f8a86e965c58617540df61b15b8ba2aee3.html)", async () => {
const document = parser.parseFromString(`<!DOCTYPE html> <a href="https://www.w3.org/WAI"><img src="/test-assets/shared/w3c-logo.png" title=""/></a>`, 'text/html');
const el = parser.parseFromString(`<!DOCTYPE html> <a href="https://www.w3.org/WAI"><img src="/test-assets/shared/w3c-logo.png" title=""/></a>`, 'text/html');

const results = (await scan(document.body)).map(({ text, url }) => {
const results = (await scan(el)).map(({ text, url }) => {
return { text, url };
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ const parser = new DOMParser();

describe("[c487ae]Link has non-empty accessible name", function () {
it("Failed Example 3 (https://act-rules.github.io/testcases/c487ae/679a7f5c037a7080108928ea74e3792cc9818490.html)", async () => {
const document = parser.parseFromString(`<!DOCTYPE html> <a href="http://www.w3.org/WAI"><img src="/test-assets/shared/w3c-logo.png" role="presentation"/></a>`, 'text/html');
const el = parser.parseFromString(`<!DOCTYPE html> <a href="http://www.w3.org/WAI"><img src="/test-assets/shared/w3c-logo.png" role="presentation"/></a>`, 'text/html');

const results = (await scan(document.body)).map(({ text, url }) => {
const results = (await scan(el)).map(({ text, url }) => {
return { text, url };
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ const parser = new DOMParser();

describe("[c487ae]Link has non-empty accessible name", function () {
it("Failed Example 9 (https://act-rules.github.io/testcases/c487ae/7453d6a6491ddfe546eabb9f9cf1f01a96b9a805.html)", async () => {
const document = parser.parseFromString(`<!DOCTYPE html> <img src="/test-assets/c487ae/planets.jpg" width="145" height="126" alt="Planets" usemap="#planetmap" />
const el = parser.parseFromString(`<!DOCTYPE html> <img src="/test-assets/c487ae/planets.jpg" width="145" height="126" alt="Planets" usemap="#planetmap" />
<map name="planetmap">
<area shape="rect" coords="0,0,82,126" href="sun.htm" />
</map>`, 'text/html');

const results = (await scan(document.body)).map(({ text, url }) => {
const results = (await scan(el)).map(({ text, url }) => {
return { text, url };
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ const parser = new DOMParser();

describe("[c487ae]Link has non-empty accessible name", function () {
it("Failed Example 10 (https://act-rules.github.io/testcases/c487ae/8130b961773da8671837e6a633ca879d1edd28d0.html)", async () => {
const document = parser.parseFromString(`<!DOCTYPE html> <a href="https://www.w3.org/WAI" role="none"> </a>`, 'text/html');
const el = parser.parseFromString(`<!DOCTYPE html> <a href="https://www.w3.org/WAI" role="none"> </a>`, 'text/html');

const results = (await scan(document.body)).map(({ text, url }) => {
const results = (await scan(el)).map(({ text, url }) => {
return { text, url };
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ const parser = new DOMParser();

describe("[c487ae]Link has non-empty accessible name", function () {
it("Failed Example 11 (https://act-rules.github.io/testcases/c487ae/8b39de5e01179f2ca0b55e8aae65a18766530003.html)", async () => {
const document = parser.parseFromString(`<!DOCTYPE html> See [<a href="https://act-rules.github.io/" role="doc-biblioref"
const el = parser.parseFromString(`<!DOCTYPE html> See [<a href="https://act-rules.github.io/" role="doc-biblioref"
><img src="https://github.com/act-rules/act-rules.github.io/blob/develop/test-assets/shared/act-logo.png" alt=""/></a
>]`, 'text/html');

const results = (await scan(document.body)).map(({ text, url }) => {
const results = (await scan(el)).map(({ text, url }) => {
return { text, url };
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ const parser = new DOMParser();

describe("[c487ae]Link has non-empty accessible name", function () {
it("Passed Example 11 (https://act-rules.github.io/testcases/c487ae/9f56c77f4e790b52f176c5e2e582112af17ce658.html)", async () => {
const document = parser.parseFromString(`<!DOCTYPE html> See [<a href="https://act-rules.github.io/" role="doc-biblioref">ACT rules</a>]`, 'text/html');
const el = parser.parseFromString(`<!DOCTYPE html> See [<a href="https://act-rules.github.io/" role="doc-biblioref">ACT rules</a>]`, 'text/html');

const results = (await scan(document.body)).map(({ text, url }) => {
const results = (await scan(el)).map(({ text, url }) => {
return { text, url };
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ const parser = new DOMParser();

describe("[c487ae]Link has non-empty accessible name", function () {
it("Failed Example 8 (https://act-rules.github.io/testcases/c487ae/a139aa4402ef782bf321751276333b10aafd8e26.html)", async () => {
const document = parser.parseFromString(`<!DOCTYPE html> <a href="https://www.w3.org/WAI" style="left: -9999px; position: absolute;">
const el = parser.parseFromString(`<!DOCTYPE html> <a href="https://www.w3.org/WAI" style="left: -9999px; position: absolute;">
<img src="/test-assets/shared/w3c-logo.png" />
</a>`, 'text/html');

const results = (await scan(document.body)).map(({ text, url }) => {
const results = (await scan(el)).map(({ text, url }) => {
return { text, url };
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ const parser = new DOMParser();

describe("[c487ae]Link has non-empty accessible name", function () {
it("Passed Example 6 (https://act-rules.github.io/testcases/c487ae/a14f9d3d1d69e75cb990c1cb8951f2d70730e450.html)", async () => {
const document = parser.parseFromString(`<!DOCTYPE html> <a href="https://www.w3.org/WAI"><img src="/test-assets/shared/w3c-logo.png" title="Web Accessibility Initiative"/></a>`, 'text/html');
const el = parser.parseFromString(`<!DOCTYPE html> <a href="https://www.w3.org/WAI"><img src="/test-assets/shared/w3c-logo.png" title="Web Accessibility Initiative"/></a>`, 'text/html');

const results = (await scan(document.body)).map(({ text, url }) => {
const results = (await scan(el)).map(({ text, url }) => {
return { text, url };
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const parser = new DOMParser();

describe("[c487ae]Link has non-empty accessible name", function () {
it("Passed Example 2 (https://act-rules.github.io/testcases/c487ae/abce4c2053a6182bae072108d2a879caecc9c25f.html)", async () => {
const document = parser.parseFromString(`<!DOCTYPE html> <div role="link" onclick="openLink(event)" onkeyup="openLink(event)" tabindex="0">
const el = parser.parseFromString(`<!DOCTYPE html> <div role="link" onclick="openLink(event)" onkeyup="openLink(event)" tabindex="0">
Web Accessibility Initiative (WAI)
</div>
<script>
Expand All @@ -16,7 +16,7 @@ describe("[c487ae]Link has non-empty accessible name", function () {
}
</script>`, 'text/html');

const results = (await scan(document.body)).map(({ text, url }) => {
const results = (await scan(el)).map(({ text, url }) => {
return { text, url };
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ const parser = new DOMParser();

describe("[c487ae]Link has non-empty accessible name", function () {
it("Passed Example 3 (https://act-rules.github.io/testcases/c487ae/c94621492b6195e264171aa7132198c46cfdf12b.html)", async () => {
const document = parser.parseFromString(`<!DOCTYPE html> <button role="link" onclick="window.location.href='https://www.w3.org/WAI/'">Click me for WAI!</button>`, 'text/html');
const el = parser.parseFromString(`<!DOCTYPE html> <button role="link" onclick="window.location.href='https://www.w3.org/WAI/'">Click me for WAI!</button>`, 'text/html');

const results = (await scan(document.body)).map(({ text, url }) => {
const results = (await scan(el)).map(({ text, url }) => {
return { text, url };
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ const parser = new DOMParser();

describe("[c487ae]Link has non-empty accessible name", function () {
it("Failed Example 4 (https://act-rules.github.io/testcases/c487ae/d2e2cc0d8464668b150ed39373c350e5c35f59d2.html)", async () => {
const document = parser.parseFromString(`<!DOCTYPE html> <a href="http://www.w3.org/WAI"><img src="/test-assets/shared/w3c-logo.png" role="none"/></a>`, 'text/html');
const el = parser.parseFromString(`<!DOCTYPE html> <a href="http://www.w3.org/WAI"><img src="/test-assets/shared/w3c-logo.png" role="none"/></a>`, 'text/html');

const results = (await scan(document.body)).map(({ text, url }) => {
const results = (await scan(el)).map(({ text, url }) => {
return { text, url };
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ const parser = new DOMParser();

describe("[c487ae]Link has non-empty accessible name", function () {
it("Failed Example 6 (https://act-rules.github.io/testcases/c487ae/e1c9b4f7702d04de31ba52d5af5c63dd6863804a.html)", async () => {
const document = parser.parseFromString(`<!DOCTYPE html> <a href="https://www.w3.org/WAI"><img src="/test-assets/shared/w3c-logo.png" aria-labelledby="id1"/></a>
const el = parser.parseFromString(`<!DOCTYPE html> <a href="https://www.w3.org/WAI"><img src="/test-assets/shared/w3c-logo.png" aria-labelledby="id1"/></a>
<div id="id1"></div>`, 'text/html');

const results = (await scan(document.body)).map(({ text, url }) => {
const results = (await scan(el)).map(({ text, url }) => {
return { text, url };
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ const parser = new DOMParser();

describe("[de46e4]Element with lang attribute has valid language tag", function () {
it("Passed Example 3 (https://act-rules.github.io/testcases/de46e4/2c6ce29c2934936b9dd032e87695bffae9bc514e.html)", async () => {
const document = parser.parseFromString(`<!DOCTYPE html> <html>
const el = parser.parseFromString(`<!DOCTYPE html> <html>
<body>
<p lang="en-US-GB">
They wandered into a strange Tiki bar on the edge of the small beach town.
</p>
</body>
</html>`, 'text/html');

const results = (await scan(document.body)).map(({ text, url }) => {
const results = (await scan(el)).map(({ text, url }) => {
return { text, url };
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ const parser = new DOMParser();

describe("[de46e4]Element with lang attribute has valid language tag", function () {
it("Passed Example 5 (https://act-rules.github.io/testcases/de46e4/3bc716b9f3d4789c4a6aea4787d273b72a41d153.html)", async () => {
const document = parser.parseFromString(`<!DOCTYPE html> <html>
const el = parser.parseFromString(`<!DOCTYPE html> <html>
<body>
<div lang="EN">
<img src="/test-assets/shared/fireworks.jpg" alt="Fireworks over Paris" />
</div>
</body>
</html>`, 'text/html');

const results = (await scan(document.body)).map(({ text, url }) => {
const results = (await scan(el)).map(({ text, url }) => {
return { text, url };
});

Expand Down
Loading

0 comments on commit 98d00be

Please sign in to comment.