From 095a17610feb6a7d13e9f4e5ac25a59f0e25bd0a Mon Sep 17 00:00:00 2001 From: Brandon Thomas Date: Fri, 2 Oct 2026 05:30:38 -0400 Subject: [PATCH] M12: Heading-nesting findings read naturally ("H3 follows an H1") Co-Authored-By: Claude Opus 5.5 --- crates/a11y/src/structure.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/a11y/src/structure.rs b/crates/a11y/src/structure.rs index 4081dacd9..dc147addb 100644 --- a/crates/a11y/src/structure.rs +++ b/crates/a11y/src/structure.rs @@ -254,8 +254,8 @@ impl Tree { _ => continue, }; if level > prev + 1 { - let after = if prev == 0 { "the first heading".to_string() } else { format!("follows an H{prev}") }; - out.push(self.finding(i, &format!("H{level} is {after}; headings should not skip levels"))); + let what = if prev == 0 { format!("the first heading is an H{level}") } else { format!("H{level} follows an H{prev}") }; + out.push(self.finding(i, &format!("{what}; headings should not skip levels"))); } prev = level; }