Skip to content
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

Rewrite iframe source attributes in APG #262

Merged
merged 1 commit into from
Oct 2, 2023

Conversation

jugglinmike
Copy link
Contributor

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


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:        <iframe
_external/aria-practices/content/patterns/button/examples/button.html-          class="support-levels-command-button"
_external/aria-practices/content/patterns/button/examples/button.html-          src="https://aria-at.w3.org/embed/reports/command-button"
--
_external/aria-practices/content/patterns/button/examples/button.html:        <iframe
_external/aria-practices/content/patterns/button/examples/button.html-          class="support-levels-toggle-button"
_external/aria-practices/content/patterns/button/examples/button.html-          src="https://aria-at.w3.org/embed/reports/toggle-button"
--
_external/aria-practices/content/patterns/slider/examples/slider-color-viewer.html:        <iframe
_external/aria-practices/content/patterns/slider/examples/slider-color-viewer.html-          class="support-levels-horizontal-slider"
_external/aria-practices/content/patterns/slider/examples/slider-color-viewer.html-          src="https://aria-at.w3.org/embed/reports/horizontal-slider"
--
_external/aria-practices/content/patterns/menu-button/examples/menu-button-links.html:        <iframe
_external/aria-practices/content/patterns/menu-button/examples/menu-button-links.html-          class="support-levels-menu-button-navigation"
_external/aria-practices/content/patterns/menu-button/examples/menu-button-links.html-          src="https://aria-at.w3.org/embed/reports/menu-button-navigation"
--
_external/aria-practices/content/patterns/link/examples/link.html:        <iframe
_external/aria-practices/content/patterns/link/examples/link.html-          class="support-levels-link-span-text"
_external/aria-practices/content/patterns/link/examples/link.html-          src="https://aria-at.w3.org/embed/reports/link-span-text"
--
_external/aria-practices/content/patterns/dialog-modal/examples/dialog.html:        <iframe
_external/aria-practices/content/patterns/dialog-modal/examples/dialog.html-          class="support-levels-modal-dialog"
_external/aria-practices/content/patterns/dialog-modal/examples/dialog.html-          src="https://aria-at.w3.org/embed/reports/modal-dialog"
--
_external/aria-practices/content/patterns/radio/examples/radio-activedescendant.html:        <iframe
_external/aria-practices/content/patterns/radio/examples/radio-activedescendant.html-          class="support-levels-radiogroup-aria-activedescendant"
_external/aria-practices/content/patterns/radio/examples/radio-activedescendant.html-          src="https://aria-at.w3.org/embed/reports/radiogroup-aria-activedescendant"
--
_external/aria-practices/content/patterns/alert/examples/alert.html:        <iframe
_external/aria-practices/content/patterns/alert/examples/alert.html-          class="support-levels-alert"
_external/aria-practices/content/patterns/alert/examples/alert.html-          src="https://aria-at.w3.org/embed/reports/alert"

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
@netlify
Copy link

netlify bot commented Sep 27, 2023

Deploy Preview for aria-practices ready!

Name Link
🔨 Latest commit 9051b4f
🔍 Latest deploy log https://app.netlify.com/sites/aria-practices/deploys/651394600c3aa80008ce6e05
😎 Deploy Preview https://deploy-preview-262--aria-practices.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@jugglinmike
Copy link
Contributor Author

Thanks, @howard-e!

@jugglinmike jugglinmike merged commit 6f52c7f into w3c:main Oct 2, 2023
6 checks passed
@jugglinmike jugglinmike deleted the rewrite-iframe-sources branch October 2, 2023 16:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants