Skip to content

Commit 8d0f094

Browse files
authored
wcag.json: Strip role="heading" and aria-level from content (#4738)
Fixes #4725. This causes no change to the build's HTML output; its only impact is to remove these two attributes from note markers in `wcag.json` output.
1 parent a6e0435 commit 8d0f094

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

11ty/guidelines.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,10 @@ const loadRemoteGuidelines = async (version: WcagVersion, stripRespec = true) =>
266266
// so that names parse consistently
267267
$("bdi").remove();
268268

269+
// Remove role="heading" + aria-level from notes/issues, as they cause more harm than good
270+
// (especially in context of content reuse via wcag.json export)
271+
$("[role='note'] .marker").removeAttr("role").removeAttr("aria-level");
272+
269273
if (!stripRespec) return $;
270274

271275
// Re-collapse definition links and notes, to be processed by this build system

0 commit comments

Comments
 (0)