ad-creative: creative-review-template.html — shape-error crash, incomplete tab ARIA, and hardcoded invented likes
Three defects confirmed by independent review in skills/ad-creative/assets/creative-review-template.html (introduced by #440). Reporting them together since they share one file and one fix round. None affect the template's core value; all three are small, self-contained corrections.
1. JSON shape errors crash the page after the header renders (Medium)
The JSON.parse guard only catches syntax errors. A structurally valid JSON payload with the wrong shape throws an uncaught error inside renderConcepts / renderPost after renderProject() has already run, leaving the header rendered and every later section blank with no diagnostic:
DATA.conceptsmissing or not an array- a concept missing
frames frames: [](empty)
renderConcepts reads c.frames.length and renderPost reads concept fields; the guard around JSON.parse never sees these. This is realistic for the file's audience, which is agents hand-editing the JSON, and it contradicts the friendly error UI the template already provides for parse errors.
Suggested fix: immediately after JSON.parse, validate the required shape and route failures through the same .err block before renderAll() runs, e.g.
function fail(msg) {
document.querySelector(".wrap").innerHTML =
'<div class="err"><b>Invalid review data.</b><br/>' + esc(msg) + '</div>';
throw new Error(msg);
}
if (!Array.isArray(DATA.concepts) || !DATA.concepts.length) fail("DATA.concepts must be a non-empty array");
DATA.concepts.forEach((c, i) => {
if (!Array.isArray(c.frames) || !c.frames.length) fail(`concepts[${i}].frames must be a non-empty array`);
});2. Concept switcher exposes tab ARIA without tab behavior (accessibility)
The concept switcher uses role="tablist" on the container and role="tab" + aria-selected on each button, but there is no aria-controls, no tabpanel association, and no arrow-key handling anywhere in the file. Keyboard and screen-reader users therefore get tab semantics with none of the tab behavior the role promises.
Suggested fix: either add basic arrow-key navigation plus aria-controls/tabpanel wiring, or simplify to plain buttons with aria-pressed, which is the pattern the platform and handle segment buttons already use in this same file.
3. Hardcoded invented engagement stat (grounding)
The Instagram preview hardcodes <div class="likes">6,240 likes</div>. An approval artifact must not present invented engagement as real, and the template's own contract agrees: references/creative-review-page.md says "Never present invented stats, fabricated test results, or stock imagery as the brand's own", and the ad-creative evals assert "Does not present invented stats or stock imagery as the brand's real assets."
Suggested fix: make it DATA-driven and omit the line when absent, e.g.
<div class="likes">${c.likes ? esc(c.likes) + " likes" : ""}</div>Reporting as a downstream consumer of the pinned skill (installed at 5b2c0007766c6a1cf1d53fd8fc73e979e0821022). No vendor file was edited on our side. Happy to open a PR against the pinned revision if useful.
Source: coreyhaines31/marketingskills