code wiki / _hdl_build / nx_a11y_breadth.nx

nx_a11y_breadth.nx

buildroot/runtime/_hdl_build/nx_a11y_breadth.nx

3626 B61 linesdepth 3pulls 3 transitivereach 2 importersview sourcekind librarytopic a11y
docsdependenciesstructsconstsfunctions

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

nx_syscalls.nx nx_brand_tokens.nx nx_a11y_breadth.nx nx_a11y_breadth_gate.nx nx_site_migrate_gate.nx

imports: nx_syscalls.nxnx_brand_tokens.nx

imported by: nx_a11y_breadth_gate.nxnx_site_migrate_gate.nx

structs

none

consts

none

functions

13func ab_has(h: *u8, n: i64, lit: *u8) -> i64 { if bt_find(h, n, lit, bt_len(lit)) >= 0 { return 1 } return 0 }
14func ab_count(h: *u8, n: i64, lit: *u8) -> i64
called by 1: ab_img_alt calls 1: bt_len
27func ab_lang(h: *u8, n: i64) -> i64 { return ab_has(h, n, "<html lang=" as *u8) } // 3.1.1
called by 2: ab_scoremain calls 1: ab_has
28func ab_title(h: *u8, n: i64) -> i64 { return ab_has(h, n, "<title>" as *u8) } // 2.4.2
called by 2: ab_scoremain calls 1: ab_has
29func ab_reflow(h: *u8, n: i64) -> i64 { return ab_has(h, n, "name=\"viewport\"" as *u8) } // 1.4.10
called by 2: ab_scoremain calls 1: ab_has
30func ab_img_alt(h: *u8, n: i64) -> i64
called by 2: ab_scoremain calls 1: ab_count
36func 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
called by 2: ab_scoremain calls 1: ab_has
37func ab_focus(h: *u8, n: i64) -> i64 { return ab_has(h, n, ":focus-visible" as *u8) } // 2.4.7
called by 2: ab_scoremain calls 1: ab_has
38func ab_motion(h: *u8, n: i64) -> i64 { return ab_has(h, n, "prefers-reduced-motion" as *u8) } // 2.3.3/2.2.2
called by 2: ab_scoremain calls 1: ab_has
39func ab_target(h: *u8, n: i64) -> i64 { return ab_has(h, n, "min-height:44px" as *u8) } // 2.5.5
called by 2: ab_scoremain calls 1: ab_has
41func ab_name(h: *u8, n: i64) -> i64 { return ab_has(h, n, "aria-label=" as *u8) } // 4.1.2
called by 2: ab_scoremain calls 1: ab_has
42func 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)
called by 2: ab_scoremain calls 1: ab_has
43func ab_contrast(h: *u8, n: i64) -> i64 { return ab_has(h, n, "var(--nx-color-" as *u8) } // 1.4.3 (token => R2-enforced)
called by 2: ab_scoremain calls 1: ab_has
46func ab_score(h: *u8, n: i64) -> i64