|
95 | 95 | "sbsec", |
96 | 96 | "land", |
97 | 97 | "hdg", |
| 98 | + "nav", |
| 99 | + "meta", |
| 100 | + "a11y", |
98 | 101 | "DED", |
99 | 102 | ] |
100 | 103 |
|
@@ -176,12 +179,17 @@ def _compute_coverage(name: str) -> dict[str, bool]: |
176 | 179 | if ref.exists() and any(f.name != "index.html" for f in ref.glob("*.html")): |
177 | 180 | result["sbar"] = True |
178 | 181 |
|
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 |
185 | 193 |
|
186 | 194 | if name in _load_dedicated_packages(): |
187 | 195 | result["DED"] = True |
@@ -1030,6 +1038,9 @@ def _create_log_page(name: str, log_path: str | None) -> str: |
1030 | 1038 | "sbsec": ("test_sidebar_lists_section_titles", "Sidebar lists section titles"), |
1031 | 1039 | "land": ("test_landing_page_has_title", "Landing page has a package title"), |
1032 | 1040 | "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"), |
1033 | 1044 | "DED": ("(dedicated tests)", "Has one or more dedicated/feature-specific tests"), |
1034 | 1045 | } |
1035 | 1046 |
|
|
0 commit comments