Skip to content

Commit

Permalink
Rewrite iframe source attributes in APG
Browse files Browse the repository at this point in the history
A forthcoming change to APG will add a relative-source `<iframe>`
element to the APG's "Feed" example page [1]. Update the build script to
transform this value using the mechanism established for other types of
resources.

[1] w3c/aria-practices#2775
  • Loading branch information
jugglinmike committed Sep 27, 2023
1 parent 7896afd commit 9051b4f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scripts/pre-build/library/rewriteElementPaths.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ const rewriteElementPaths = async (html, { onSourcePath }) => {
const linkTags = html.querySelectorAll("link[href]");
const scriptTags = html.querySelectorAll("script[src]");
const imgTags = html.querySelectorAll("img[src]");
const iframeTags = html.querySelectorAll("iframe[src]");

[...aTags, ...linkTags, ...scriptTags, ...imgTags].forEach((element) => {
[...aTags, ...linkTags, ...scriptTags, ...imgTags, ...iframeTags].forEach((element) => {
fixSpecLink(element);

const href = element.getAttribute("href");
Expand Down

0 comments on commit 9051b4f

Please sign in to comment.