code wiki / _hdl_build / nx_a11y_breadth.nx
nx_a11y_breadth.nx
buildroot/runtime/_hdl_build/nx_a11y_breadth.nx
about
nx_a11y_breadth.nx -- a BROAD WCAG-2.2 checker (12 lexically-detectable criteria) on built HTML, to widen the
accessibility arc from the old 3-criterion nx_a11y_check toward axe/Lighthouse breadth. The HONEST exceed axis is
NOT raw criteria count (axe checks 50+, an acknowledged residual) -- it is that our builder PASSES + ENFORCES these
BY CONSTRUCTION (a non-compliant page can't be emitted) and SOVEREIGNLY (no cloud audit), where axe/Lighthouse only
AUDIT (you fix manually) and the proprietary builders score a11y≈0 (June-2026 research). 12 criteria:
3.1.1 lang · 2.4.2 title · 1.4.10 reflow(viewport) · 1.1.1 img-alt · 1.3.1 landmarks · 2.4.7 focus-visible ·
2.3.3/2.2.2 reduced-motion · 2.5.5 target-size · 2.4.4 link-purpose · 4.1.2 name(aria-label) · 2.1.1 keyboard(no
JS-only) · 1.4.3 contrast(token-driven => R2-guard-enforced).
REUSE: nx_brand_tokens (bt_find). Library, sovereign. license_tier: ORIGINAL
dependencies 2 imports · 2 importers
imports: nx_syscalls.nxnx_brand_tokens.nx
imported by: nx_a11y_breadth_gate.nxnx_site_migrate_gate.nx
structs
| none |
consts
| none |
functions
| 13 | func ab_has(h: *u8, n: i64, lit: *u8) -> i64 { if bt_find(h, n, lit, bt_len(lit)) >= 0 { return 1 } return 0 } |
| 14 | func ab_count(h: *u8, n: i64, lit: *u8) -> i64 |
| 27 | func ab_lang(h: *u8, n: i64) -> i64 { return ab_has(h, n, "<html lang=" as *u8) } // 3.1.1 |
| 28 | func ab_title(h: *u8, n: i64) -> i64 { return ab_has(h, n, "<title>" as *u8) } // 2.4.2 |
| 29 | func ab_reflow(h: *u8, n: i64) -> i64 { return ab_has(h, n, "name=\"viewport\"" as *u8) } // 1.4.10 |
| 30 | func ab_img_alt(h: *u8, n: i64) -> i64 |
| 36 | func ab_landmarks(h: *u8, n: i64) -> i64 { if ab_has(h, n, "<header" as *u8) == 1 { if ab_has(h, n, "<footer" as *u8) == 1 { if ab_has(h, n, "<h1" as *u8) == 1 { return 1 } } } return 0 } // 1.3.1 |
| 37 | func ab_focus(h: *u8, n: i64) -> i64 { return ab_has(h, n, ":focus-visible" as *u8) } // 2.4.7 |
| 38 | func ab_motion(h: *u8, n: i64) -> i64 { return ab_has(h, n, "prefers-reduced-motion" as *u8) } // 2.3.3/2.2.2 |
| 39 | func ab_target(h: *u8, n: i64) -> i64 { return ab_has(h, n, "min-height:44px" as *u8) } // 2.5.5 |
| 40 | func ab_links(h: *u8, n: i64) -> i64 { if ab_has(h, n, "click here" as *u8) == 1 { return 0 } if ab_has(h, n, "read more" as *u8) == 1 { return 0 } return 1 } // 2.4.4 |
| 41 | func ab_name(h: *u8, n: i64) -> i64 { return ab_has(h, n, "aria-label=" as *u8) } // 4.1.2 |
| 42 | func ab_keyboard(h: *u8, n: i64) -> i64 { if ab_has(h, n, "<script" as *u8) == 1 { return 0 } return 1 } // 2.1.1 (no JS-only) |
| 43 | func ab_contrast(h: *u8, n: i64) -> i64 { return ab_has(h, n, "var(--nx-color-" as *u8) } // 1.4.3 (token => R2-enforced) |
| 46 | func ab_score(h: *u8, n: i64) -> i64 |