w3c / wai-aria-practices

WAI Website Resource for aria-practices guidelines
https://aria-practices.netlify.app/aria/apg/
15 stars 14 forks source link

Rewrite iframe source attributes in APG #262

Closed jugglinmike closed 9 months ago

jugglinmike commented 9 months ago

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] https://github.com/w3c/aria-practices/pull/2775


I'm not confident that this change is valid because I haven't been able to find tests for the logic I modified. I've experimentally verified that it appears to function as intended without undesirable side effects by making some local modifications to the APG source and inspecting the result.

At the moment, it appears that all of the <iframe> elements in APG use absolute URLs for their src attributes and thus not effected by the transformation.

$ find _external/aria-practices/ -type f -iname '*.html' -print0 | xargs -0 grep -i '<iframe' -A2 _external/aria-practices/content/patterns/button/examples/button.html: