OCaml HTML5 parser/serialiser based on Python's JustHTML
1(** Language attribute validation checker.
2
3 Validates:
4 - lang attribute values are valid BCP 47 tags
5 - xml:lang matches lang when both present
6 - Document has a lang attribute on root element
7
8 This checker ensures proper language markup:
9 - lang attribute values are validated using BCP 47 format
10 - When both lang and xml:lang are present, they must match
11 - Warning if <html> element lacks lang attribute
12 - Empty lang="" is valid (indicates unknown language)
13 - Primary language subtag should be valid *)
14
15val checker : Checker.t
16(** [checker] is a checker instance for validating language attributes. *)