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

Fail build upon encountering p w/ class="instructions" #4199

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

kfranqueiro
Copy link
Contributor

When first implementing the Eleventy build system in #3917, I kept the existing XSLT behavior of stripping <p class="instructions"> paragraphs.

I later cleaned up the remainder of them in #3941.

Now we have the opportunity to ensure no new ones ever sneak in, by failing the build if any are present (which will also fail the check on PRs).

With this change, any page found to contain <p class="instructions"> will present an error, e.g.:

./techniques/aria/ARIA25.html contains a <p class="instructions"> element.
  This suggests that a template was copied and not fully filled out.
  If the paragraph has been modified and should be retained, remove the class.
  Otherwise, if the corresponding section has been updated, remove the paragraph.
[11ty] Problem writing Eleventy templates:
[11ty] 1. Having trouble rendering liquid template ./techniques/aria/ARIA25.html (via TemplateContentRenderError)
[11ty] 2. Instructions paragraph found; please resolve.

This PR causes no changes in current build output.

(Yes, I implemented this after reviewing a PR containing stray instructions paragraphs)

@kfranqueiro kfranqueiro requested a review from iadawn January 13, 2025 20:45
Copy link

netlify bot commented Jan 13, 2025

Deploy Preview for wcag2 ready!

Name Link
🔨 Latest commit 93230ae
🔍 Latest deploy log https://app.netlify.com/sites/wcag2/deploys/67857b608586f200088182a1
😎 Deploy Preview https://deploy-preview-4199--wcag2.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.

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.

1 participant