Skip to content

Commit b98dcb3

Browse files
committed
Add nav/meta/a11y coverage and adjust hdg logic
1 parent 6901273 commit b98dcb3

1 file changed

Lines changed: 17 additions & 6 deletions

File tree

test-packages/render_all.py

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,9 @@
9595
"sbsec",
9696
"land",
9797
"hdg",
98+
"nav",
99+
"meta",
100+
"a11y",
98101
"DED",
99102
]
100103

@@ -176,12 +179,17 @@ def _compute_coverage(name: str) -> dict[str, bool]:
176179
if ref.exists() and any(f.name != "index.html" for f in ref.glob("*.html")):
177180
result["sbar"] = True
178181

179-
# Heading check (first 20 packages by catalog order)
180-
try:
181-
if ALL_PACKAGES.index(name) < 20:
182-
result["hdg"] = True
183-
except ValueError:
184-
pass
182+
# Heading check — applies to all rendered packages with reference pages
183+
ref_exists = (RENDERED_DIR / name / "great-docs" / "_site" / "reference").exists()
184+
if ref_exists:
185+
result["hdg"] = True
186+
187+
# Navbar, meta, and a11y — apply to all packages with an index.html
188+
site_index = RENDERED_DIR / name / "great-docs" / "_site" / "index.html"
189+
if site_index.exists():
190+
result["nav"] = True
191+
result["meta"] = True
192+
result["a11y"] = True
185193

186194
if name in _load_dedicated_packages():
187195
result["DED"] = True
@@ -1030,6 +1038,9 @@ def _create_log_page(name: str, log_path: str | None) -> str:
10301038
"sbsec": ("test_sidebar_lists_section_titles", "Sidebar lists section titles"),
10311039
"land": ("test_landing_page_has_title", "Landing page has a package title"),
10321040
"hdg": ("test_no_broken_heading_attributes", "No broken heading attributes"),
1041+
"nav": ("test_navbar_renders_with_links", "Navbar renders with navigation links"),
1042+
"meta": ("test_page_has_meta_description", "Page has meta description and OG tags"),
1043+
"a11y": ("test_heading_hierarchy_no_skips", "Heading hierarchy has no level skips"),
10331044
"DED": ("(dedicated tests)", "Has one or more dedicated/feature-specific tests"),
10341045
}
10351046

0 commit comments

Comments
 (0)