···7171 ("End tag \xe2\x80\x9cbr\xe2\x80\x9d.", "end-tag-br")
7272 else if s = "expected-closing-tag-but-got-eof" then
7373 ("End of file seen and there were open elements.", "eof-in-open-element")
7474+ else if String.length s > 28 && String.sub s 0 28 = "bad-start-tag-in-head-noscri" then
7575+ let colon_pos = String.index s ':' in
7676+ let element = String.sub s (colon_pos + 1) (String.length s - colon_pos - 1) in
7777+ (Printf.sprintf "Bad start tag in \xe2\x80\x9c%s\xe2\x80\x9d in \xe2\x80\x9cnoscript\xe2\x80\x9d in \xe2\x80\x9chead\xe2\x80\x9d." element, "bad-start-tag-in-head-noscript")
7478 else if String.length s > 19 && String.sub s 0 19 = "unexpected-end-tag:" then
7579 let element = String.sub s 19 (String.length s - 19) in
7680 (Printf.sprintf "Stray end tag \xe2\x80\x9c%s\xe2\x80\x9d." element, "stray-end-tag")
+4-2
lib/html5_checker/specialized/aria_checker.ml
···580580 Message_collector.add_typed collector Error_code.Li_bad_role_in_tablist
581581 | None ->
582582 (* Check if in list context (ul/ol/menu without explicit role, or role=list) *)
583583+ (* Nu validator produces this error for ANY explicit role on li in list context,
584584+ even role="listitem" - because having an explicit role is itself the problem.
585585+ The message says "other than listitem" but the rule is: don't use explicit roles. *)
583586 if is_in_list_context state then
584584- if first_role <> "listitem" then
585585- Message_collector.add_typed collector Error_code.Li_bad_role_in_list)
587587+ Message_collector.add_typed collector Error_code.Li_bad_role_in_list)
586588 end
587589 end;
588590
+2-2
lib/html5rw/parser/parser_tree_builder.ml
···934934 | Token.Tag { kind = Token.Start; name; _ }
935935 when List.mem name ["head"; "noscript"] ->
936936 parse_error t "unexpected-start-tag"
937937- | Token.Tag { kind = Token.Start; _ } ->
938938- parse_error t "unexpected-start-tag";
937937+ | Token.Tag { kind = Token.Start; name; _ } ->
938938+ parse_error t ("bad-start-tag-in-head-noscript:" ^ name);
939939 pop_current t; (* Pop noscript *)
940940 t.mode <- Parser_insertion_mode.In_head;
941941 process_token t token