Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions packages/axle-chrome/popup.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,17 @@ function renderResult(axeResult, pageUrl) {

const encoded = encodeURIComponent(pageUrl || "");
const openFullUrl = `https://axle-iota.vercel.app/?url=${encoded}`;
const upsellHtml = violations.length
? `<div class="loading"><a href="https://axle-iota.vercel.app/pricing?utm_source=axle-chrome" target="_blank">💡 Get AI-generated code fixes + unlimited scans →</a></div>`
: "";

result.innerHTML = `
${summaryHtml}
${violations.length ? `<ul class="rules">${list}</ul>` : '<div class="loading">✅ No automated violations detected.</div>'}
<div class="loading">
<a href="${openFullUrl}" target="_blank">Open full report on axle →</a>
</div>
${upsellHtml}
`;
}

Expand Down
12 changes: 12 additions & 0 deletions packages/axle-cli/src/axle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,18 @@ async function main() {
`[axle] ${failing ? "FAILING" : "passing"} (threshold: ${args.failOn})`
);

// Upsell: when issues were found but no AI fixes were produced (no key, or
// --with-ai-fixes not passed), point to the paid plan at the moment of need.
if (result.violations.length > 0 && fixes.size === 0) {
console.log("");
console.log(
`[axle] 💡 Get AI-generated code fixes for these ${result.violations.length} issue(s), plus unlimited scans + trend history:`
);
console.log(
`[axle] https://axle-iota.vercel.app/pricing?utm_source=axle-cli`
);
}

await pingTelemetry("scan_complete");
process.exit(failing ? 1 : 0);
}
Expand Down
5 changes: 5 additions & 0 deletions packages/axle-cloudflare/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,5 +70,10 @@ child.on("exit", (code) => {
/* no-op */
}
}
if (code === 1) {
console.log(
"[axle] 💡 Get AI-generated code fixes for these issues, plus unlimited scans + trend history: https://axle-iota.vercel.app/pricing?utm_source=axle-cloudflare"
);
}
process.exit(code ?? 0);
});
9 changes: 8 additions & 1 deletion packages/axle-netlify/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,20 @@ export const onPostBuild = async ({ utils, inputs, constants }) => {
/* no-op */
}

const upsell =
code === 1
? "\n\n💡 Get AI-generated code fixes for these issues, plus unlimited scans + trend history: https://axle-iota.vercel.app/pricing?utm_source=axle-netlify"
: "";
utils.status.show({
title: "axle",
summary: code === 0 ? "Passing ✅" : "Failed ❌",
text: summary.slice(0, 8000),
text: summary.slice(0, 8000) + upsell,
});

if (code === 1) {
console.log(
"[axle] 💡 Get AI-generated code fixes + unlimited scans: https://axle-iota.vercel.app/pricing?utm_source=axle-netlify"
);
return utils.build.failBuild("axle: accessibility violations detected.");
}
};
5 changes: 5 additions & 0 deletions packages/axle-vercel/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,5 +82,10 @@ child.on("exit", (code) => {
/* no-op */
}
}
if (code === 1) {
console.log(
"[axle] 💡 Get AI-generated code fixes for these issues, plus unlimited scans + trend history: https://axle-iota.vercel.app/pricing?utm_source=axle-vercel"
);
}
process.exit(code ?? 0);
});
Loading