@codelaw/rules-html 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +23 -0
- package/NOTICE +24 -0
- package/README.md +162 -2
- package/codelaw-pack.toml +6 -0
- package/data/html/elements.json +4892 -0
- package/data/html/entities.json +1 -0
- package/data/html/input-attributes.json +227 -0
- package/package.json +14 -4
- package/presets/html/a11y.toml +29 -0
- package/presets/html/conventions.toml +6 -0
- package/presets/html/document.toml +8 -0
- package/presets/html/recommended.toml +67 -0
- package/rules/html/area-alt.md +48 -0
- package/rules/html/aria-hidden-body.md +39 -0
- package/rules/html/aria-label-misuse.md +42 -0
- package/rules/html/attribute-allowed-values.cases.md +31 -0
- package/rules/html/attribute-allowed-values.md +41 -0
- package/rules/html/attribute-misuse.md +39 -0
- package/rules/html/autocomplete-password.md +41 -0
- package/rules/html/button-type.cases.md +28 -0
- package/rules/html/button-type.md +35 -0
- package/rules/html/close-attr.md +33 -0
- package/rules/html/close-order.cases.md +38 -0
- package/rules/html/close-order.md +47 -0
- package/rules/html/deprecated.md +39 -0
- package/rules/html/doctype-html.md +36 -0
- package/rules/html/element-name.cases.md +21 -0
- package/rules/html/element-name.md +42 -0
- package/rules/html/element-permitted-content.cases.md +54 -0
- package/rules/html/element-permitted-content.md +45 -0
- package/rules/html/element-permitted-occurrences.md +45 -0
- package/rules/html/element-permitted-order.md +44 -0
- package/rules/html/element-permitted-parent.cases.md +11 -0
- package/rules/html/element-permitted-parent.md +43 -0
- package/rules/html/element-required-ancestor.md +45 -0
- package/rules/html/element-required-attributes.md +44 -0
- package/rules/html/element-required-content.cases.md +23 -0
- package/rules/html/element-required-content.md +43 -0
- package/rules/html/empty-heading.md +40 -0
- package/rules/html/empty-title.md +39 -0
- package/rules/html/fieldset-legend.md +44 -0
- package/rules/html/form-dup-name.cases.md +38 -0
- package/rules/html/form-dup-name.md +48 -0
- package/rules/html/form-submit.md +44 -0
- package/rules/html/heading-level.cases.md +26 -0
- package/rules/html/heading-level.md +44 -0
- package/rules/html/hidden-focusable.cases.md +23 -0
- package/rules/html/hidden-focusable.md +40 -0
- package/rules/html/img-alt.cases.md +22 -0
- package/rules/html/img-alt.md +44 -0
- package/rules/html/img-title.md +40 -0
- package/rules/html/input-attributes.md +34 -0
- package/rules/html/input-image-alt.md +39 -0
- package/rules/html/input-missing-label.md +40 -0
- package/rules/html/link-text.md +39 -0
- package/rules/html/long-title.md +40 -0
- package/rules/html/map-dup-name.md +40 -0
- package/rules/html/map-id-name.md +38 -0
- package/rules/html/meta-refresh.md +42 -0
- package/rules/html/missing-doctype.cases.md +24 -0
- package/rules/html/missing-doctype.md +43 -0
- package/rules/html/multiple-labeled-controls.md +40 -0
- package/rules/html/no-abstract-role.md +39 -0
- package/rules/html/no-autoplay.md +37 -0
- package/rules/html/no-conditional-comment.md +39 -0
- package/rules/html/no-deprecated-attr.md +39 -0
- package/rules/html/no-dup-attr.md +37 -0
- package/rules/html/no-dup-class.md +33 -0
- package/rules/html/no-duplicate-id.cases.md +23 -0
- package/rules/html/no-duplicate-id.md +42 -0
- package/rules/html/no-implicit-close.cases.md +38 -0
- package/rules/html/no-implicit-close.md +40 -0
- package/rules/html/no-implicit-input-type.md +34 -0
- package/rules/html/no-inline-script.md +42 -0
- package/rules/html/no-inline-style.cases.md +12 -0
- package/rules/html/no-inline-style.md +42 -0
- package/rules/html/no-missing-references.md +39 -0
- package/rules/html/no-multiple-main.md +40 -0
- package/rules/html/no-raw-characters.cases.md +84 -0
- package/rules/html/no-raw-characters.md +35 -0
- package/rules/html/no-redundant-aria-label.md +36 -0
- package/rules/html/no-redundant-for.md +34 -0
- package/rules/html/no-redundant-role.md +42 -0
- package/rules/html/no-utf8-bom.md +45 -0
- package/rules/html/prefer-button.md +39 -0
- package/rules/html/prefer-native-element.md +40 -0
- package/rules/html/prefer-tbody.md +41 -0
- package/rules/html/require-sri.md +41 -0
- package/rules/html/script-element.md +36 -0
- package/rules/html/script-type.md +33 -0
- package/rules/html/target-blank-rel.cases.md +35 -0
- package/rules/html/target-blank-rel.md +32 -0
- package/rules/html/tel-non-breaking.md +37 -0
- package/rules/html/text-content.md +39 -0
- package/rules/html/th-scope.md +47 -0
- package/rules/html/unique-landmark.md +41 -0
- package/rules/html/unrecognized-char-ref.cases.md +41 -0
- package/rules/html/unrecognized-char-ref.md +42 -0
- package/rules/html/valid-autocomplete.cases.md +42 -0
- package/rules/html/valid-autocomplete.md +42 -0
- package/rules/html/valid-for.md +40 -0
- package/rules/html/valid-id.md +40 -0
- package/rules/html/void-content.md +34 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
["Æ","Æ","&","&","Á","Á","Ă","Â","Â","А","𝔄","À","À","Α","Ā","⩓","Ą","𝔸","⁡","Å","Å","𝒜","≔","Ã","Ã","Ä","Ä","∖","⫧","⌆","Б","∵","ℬ","Β","𝔅","𝔹","˘","ℬ","≎","Ч","©","©","Ć","⋒","ⅅ","ℭ","Č","Ç","Ç","Ĉ","∰","Ċ","¸","·","ℭ","Χ","⊙","⊖","⊕","⊗","∲","”","’","∷","⩴","≡","∯","∮","ℂ","∐","∳","⨯","𝒞","⋓","≍","ⅅ","⤑","Ђ","Ѕ","Џ","‡","↡","⫤","Ď","Д","∇","Δ","𝔇","´","˙","˝","`","˜","⋄","ⅆ","𝔻","¨","⃜","≐","∯","¨","⇓","⇐","⇔","⫤","⟸","⟺","⟹","⇒","⊨","⇑","⇕","∥","↓","⤓","⇵","̑","⥐","⥞","↽","⥖","⥟","⇁","⥗","⊤","↧","⇓","𝒟","Đ","Ŋ","Ð","Ð","É","É","Ě","Ê","Ê","Э","Ė","𝔈","È","È","∈","Ē","◻","▫","Ę","𝔼","Ε","⩵","≂","⇌","ℰ","⩳","Η","Ë","Ë","∃","ⅇ","Ф","𝔉","◼","▪","𝔽","∀","ℱ","ℱ","Ѓ",">",">","Γ","Ϝ","Ğ","Ģ","Ĝ","Г","Ġ","𝔊","⋙","𝔾","≥","⋛","≧","⪢","≷","⩾","≳","𝒢","≫","Ъ","ˇ","^","Ĥ","ℌ","ℋ","ℍ","─","ℋ","Ħ","≎","≏","Е","IJ","Ё","Í","Í","Î","Î","И","İ","ℑ","Ì","Ì","ℑ","Ī","ⅈ","⇒","∬","∫","⋂","⁣","⁢","Į","𝕀","Ι","ℐ","Ĩ","І","Ï","Ï","Ĵ","Й","𝔍","𝕁","𝒥","Ј","Є","Х","Ќ","Κ","Ķ","К","𝔎","𝕂","𝒦","Љ","<","<","Ĺ","Λ","⟪","ℒ","↞","Ľ","Ļ","Л","⟨","←","⇤","⇆","⌈","⟦","⥡","⇃","⥙","⌊","↔","⥎","⊣","↤","⥚","⊲","⧏","⊴","⥑","⥠","↿","⥘","↼","⥒","⇐","⇔","⋚","≦","≶","⪡","⩽","≲","𝔏","⋘","⇚","Ŀ","⟵","⟷","⟶","⟸","⟺","⟹","𝕃","↙","↘","ℒ","↰","Ł","≪","⤅","М"," ","ℳ","𝔐","∓","𝕄","ℳ","Μ","Њ","Ń","Ň","Ņ","Н","​","​","​","​","≫","≪","
","𝔑","⁠"," ","ℕ","⫬","≢","≭","∦","∉","≠","≂̸","∄","≯","≱","≧̸","≫̸","≹","⩾̸","≵","≎̸","≏̸","⋪","⧏̸","⋬","≮","≰","≸","≪̸","⩽̸","≴","⪢̸","⪡̸","⊀","⪯̸","⋠","∌","⋫","⧐̸","⋭","⊏̸","⋢","⊐̸","⋣","⊂⃒","⊈","⊁","⪰̸","⋡","≿̸","⊃⃒","⊉","≁","≄","≇","≉","∤","𝒩","Ñ","Ñ","Ν","Œ","Ó","Ó","Ô","Ô","О","Ő","𝔒","Ò","Ò","Ō","Ω","Ο","𝕆","“","‘","⩔","𝒪","Ø","Ø","Õ","Õ","⨷","Ö","Ö","‾","⏞","⎴","⏜","∂","П","𝔓","Φ","Π","±","ℌ","ℙ","⪻","≺","⪯","≼","≾","″","∏","∷","∝","𝒫","Ψ",""",""","𝔔","ℚ","𝒬","⤐","®","®","Ŕ","⟫","↠","⤖","Ř","Ŗ","Р","ℜ","∋","⇋","⥯","ℜ","Ρ","⟩","→","⇥","⇄","⌉","⟧","⥝","⇂","⥕","⌋","⊢","↦","⥛","⊳","⧐","⊵","⥏","⥜","↾","⥔","⇀","⥓","⇒","ℝ","⥰","⇛","ℛ","↱","⧴","Щ","Ш","Ь","Ś","⪼","Š","Ş","Ŝ","С","𝔖","↓","←","→","↑","Σ","∘","𝕊","√","□","⊓","⊏","⊑","⊐","⊒","⊔","𝒮","⋆","⋐","⋐","⊆","≻","⪰","≽","≿","∋","∑","⋑","⊃","⊇","⋑","Þ","Þ","™","Ћ","Ц","	","Τ","Ť","Ţ","Т","𝔗","∴","Θ","  "," ","∼","≃","≅","≈","𝕋","⃛","𝒯","Ŧ","Ú","Ú","↟","⥉","Ў","Ŭ","Û","Û","У","Ű","𝔘","Ù","Ù","Ū","_","⏟","⎵","⏝","⋃","⊎","Ų","𝕌","↑","⤒","⇅","↕","⥮","⊥","↥","⇑","⇕","↖","↗","ϒ","Υ","Ů","𝒰","Ũ","Ü","Ü","⊫","⫫","В","⊩","⫦","⋁","‖","‖","∣","|","❘","≀"," ","𝔙","𝕍","𝒱","⊪","Ŵ","⋀","𝔚","𝕎","𝒲","𝔛","Ξ","𝕏","𝒳","Я","Ї","Ю","Ý","Ý","Ŷ","Ы","𝔜","𝕐","𝒴","Ÿ","Ж","Ź","Ž","З","Ż","​","Ζ","ℨ","ℤ","𝒵","á","á","ă","∾","∾̳","∿","â","â","´","´","а","æ","æ","⁡","𝔞","à","à","ℵ","ℵ","α","ā","⨿","&","&","∧","⩕","⩜","⩘","⩚","∠","⦤","∠","∡","⦨","⦩","⦪","⦫","⦬","⦭","⦮","⦯","∟","⊾","⦝","∢","Å","⍼","ą","𝕒","≈","⩰","⩯","≊","≋","'","≈","≊","å","å","𝒶","*","≈","≍","ã","ã","ä","ä","∳","⨑","⫭","≌","϶","‵","∽","⋍","⊽","⌅","⌅","⎵","⎶","≌","б","„","∵","∵","⦰","϶","ℬ","β","ℶ","≬","𝔟","⋂","◯","⋃","⨀","⨁","⨂","⨆","★","▽","△","⨄","⋁","⋀","⤍","⧫","▪","▴","▾","◂","▸","␣","▒","░","▓","█","=⃥","≡⃥","⌐","𝕓","⊥","⊥","⋈","╗","╔","╖","╓","═","╦","╩","╤","╧","╝","╚","╜","╙","║","╬","╣","╠","╫","╢","╟","⧉","╕","╒","┐","┌","─","╥","╨","┬","┴","⊟","⊞","⊠","╛","╘","┘","└","│","╪","╡","╞","┼","┤","├","‵","˘","¦","¦","𝒷","⁏","∽","⋍","\","⧅","⟈","•","•","≎","⪮","≏","≏","ć","∩","⩄","⩉","⩋","⩇","⩀","∩︀","⁁","ˇ","⩍","č","ç","ç","ĉ","⩌","⩐","ċ","¸","¸","⦲","¢","¢","·","𝔠","ч","✓","✓","χ","○","⧃","ˆ","≗","↺","↻","®","Ⓢ","⊛","⊚","⊝","≗","⨐","⫯","⧂","♣","♣",":","≔","≔",",","@","∁","∘","∁","ℂ","≅","⩭","∮","𝕔","∐","©","©","℗","↵","✗","𝒸","⫏","⫑","⫐","⫒","⋯","⤸","⤵","⋞","⋟","↶","⤽","∪","⩈","⩆","⩊","⊍","⩅","∪︀","↷","⤼","⋞","⋟","⋎","⋏","¤","¤","↶","↷","⋎","⋏","∲","∱","⌭","⇓","⥥","†","ℸ","↓","‐","⊣","⤏","˝","ď","д","ⅆ","‡","⇊","⩷","°","°","δ","⦱","⥿","𝔡","⇃","⇂","⋄","⋄","♦","♦","¨","ϝ","⋲","÷","÷","÷","⋇","⋇","ђ","⌞","⌍","$","𝕕","˙","≐","≑","∸","∔","⊡","⌆","↓","⇊","⇃","⇂","⤐","⌟","⌌","𝒹","ѕ","⧶","đ","⋱","▿","▾","⇵","⥯","⦦","џ","⟿","⩷","≑","é","é","⩮","ě","≖","ê","ê","≕","э","ė","ⅇ","≒","𝔢","⪚","è","è","⪖","⪘","⪙","⏧","ℓ","⪕","⪗","ē","∅","∅","∅"," "," "," ","ŋ"," ","ę","𝕖","⋕","⧣","⩱","ε","ε","ϵ","≖","≕","≂","⪖","⪕","=","≟","≡","⩸","⧥","≓","⥱","ℯ","≐","≂","η","ð","ð","ë","ë","€","!","∃","ℰ","ⅇ","≒","ф","♀","ffi","ff","ffl","𝔣","fi","fj","♭","fl","▱","ƒ","𝕗","∀","⋔","⫙","⨍","½","½","⅓","¼","¼","⅕","⅙","⅛","⅔","⅖","¾","¾","⅗","⅜","⅘","⅚","⅝","⅞","⁄","⌢","𝒻","≧","⪌","ǵ","γ","ϝ","⪆","ğ","ĝ","г","ġ","≥","⋛","≥","≧","⩾","⩾","⪩","⪀","⪂","⪄","⋛︀","⪔","𝔤","≫","⋙","ℷ","ѓ","≷","⪒","⪥","⪤","≩","⪊","⪊","⪈","⪈","≩","⋧","𝕘","`","ℊ","≳","⪎","⪐",">",">","⪧","⩺","⋗","⦕","⩼","⪆","⥸","⋗","⋛","⪌","≷","≳","≩︀","≩︀","⇔"," ","½","ℋ","ъ","↔","⥈","↭","ℏ","ĥ","♥","♥","…","⊹","𝔥","⤥","⤦","⇿","∻","↩","↪","𝕙","―","𝒽","ℏ","ħ","⁃","‐","í","í","⁣","î","î","и","е","¡","¡","⇔","𝔦","ì","ì","ⅈ","⨌","∭","⧜","℩","ij","ī","ℑ","ℐ","ℑ","ı","⊷","Ƶ","∈","℅","∞","⧝","ı","∫","⊺","ℤ","⊺","⨗","⨼","ё","į","𝕚","ι","⨼","¿","¿","𝒾","∈","⋹","⋵","⋴","⋳","∈","⁢","ĩ","і","ï","ï","ĵ","й","𝔧","ȷ","𝕛","𝒿","ј","є","κ","ϰ","ķ","к","𝔨","ĸ","х","ќ","𝕜","𝓀","⇚","⇐","⤛","⤎","≦","⪋","⥢","ĺ","⦴","ℒ","λ","⟨","⦑","⟨","⪅","«","«","←","⇤","⤟","⤝","↩","↫","⤹","⥳","↢","⪫","⤙","⪭","⪭︀","⤌","❲","{","[","⦋","⦏","⦍","ľ","ļ","⌈","{","л","⤶","“","„","⥧","⥋","↲","≤","←","↢","↽","↼","⇇","↔","⇆","⇋","↭","⋋","⋚","≤","≦","⩽","⩽","⪨","⩿","⪁","⪃","⋚︀","⪓","⪅","⋖","⋚","⪋","≶","≲","⥼","⌊","𝔩","≶","⪑","↽","↼","⥪","▄","љ","≪","⇇","⌞","⥫","◺","ŀ","⎰","⎰","≨","⪉","⪉","⪇","⪇","≨","⋦","⟬","⇽","⟦","⟵","⟷","⟼","⟶","↫","↬","⦅","𝕝","⨭","⨴","∗","_","◊","◊","⧫","(","⦓","⇆","⌟","⇋","⥭","‎","⊿","‹","𝓁","↰","≲","⪍","⪏","[","‘","‚","ł","<","<","⪦","⩹","⋖","⋋","⋉","⥶","⩻","⦖","◃","⊴","◂","⥊","⥦","≨︀","≨︀","∺","¯","¯","♂","✠","✠","↦","↦","↧","↤","↥","▮","⨩","м","—","∡","𝔪","℧","µ","µ","∣","*","⫰","·","·","−","⊟","∸","⨪","⫛","…","∓","⊧","𝕞","∓","𝓂","∾","μ","⊸","⊸","⋙̸","≫⃒","≫̸","⇍","⇎","⋘̸","≪⃒","≪̸","⇏","⊯","⊮","∇","ń","∠⃒","≉","⩰̸","≋̸","ʼn","≉","♮","♮","ℕ"," "," ","≎̸","≏̸","⩃","ň","ņ","≇","⩭̸","⩂","н","–","≠","⇗","⤤","↗","↗","≐̸","≢","⤨","≂̸","∄","∄","𝔫","≧̸","≱","≱","≧̸","⩾̸","⩾̸","≵","≯","≯","⇎","↮","⫲","∋","⋼","⋺","∋","њ","⇍","≦̸","↚","‥","≰","↚","↮","≰","≦̸","⩽̸","⩽̸","≮","≴","≮","⋪","⋬","∤","𝕟","¬","¬","∉","⋹̸","⋵̸","∉","⋷","⋶","∌","∌","⋾","⋽","∦","∦","⫽⃥","∂̸","⨔","⊀","⋠","⪯̸","⊀","⪯̸","⇏","↛","⤳̸","↝̸","↛","⋫","⋭","⊁","⋡","⪰̸","𝓃","∤","∦","≁","≄","≄","∤","∦","⋢","⋣","⊄","⫅̸","⊈","⊂⃒","⊈","⫅̸","⊁","⪰̸","⊅","⫆̸","⊉","⊃⃒","⊉","⫆̸","≹","ñ","ñ","≸","⋪","⋬","⋫","⋭","ν","#","№"," ","⊭","⤄","≍⃒","⊬","≥⃒",">⃒","⧞","⤂","≤⃒","<⃒","⊴⃒","⤃","⊵⃒","∼⃒","⇖","⤣","↖","↖","⤧","Ⓢ","ó","ó","⊛","⊚","ô","ô","о","⊝","ő","⨸","⊙","⦼","œ","⦿","𝔬","˛","ò","ò","⧁","⦵","Ω","∮","↺","⦾","⦻","‾","⧀","ō","ω","ο","⦶","⊖","𝕠","⦷","⦹","⊕","∨","↻","⩝","ℴ","ℴ","ª","ª","º","º","⊶","⩖","⩗","⩛","ℴ","ø","ø","⊘","õ","õ","⊗","⨶","ö","ö","⌽","∥","¶","¶","∥","⫳","⫽","∂","п","%",".","‰","⊥","‱","𝔭","φ","ϕ","ℳ","☎","π","⋔","ϖ","ℏ","ℎ","ℏ","+","⨣","⊞","⨢","∔","⨥","⩲","±","±","⨦","⨧","±","⨕","𝕡","£","£","≺","⪳","⪷","≼","⪯","≺","⪷","≼","⪯","⪹","⪵","⋨","≾","′","ℙ","⪵","⪹","⋨","∏","⌮","⌒","⌓","∝","∝","≾","⊰","𝓅","ψ"," ","𝔮","⨌","𝕢","⁗","𝓆","ℍ","⨖","?","≟",""",""","⇛","⇒","⤜","⤏","⥤","∽̱","ŕ","√","⦳","⟩","⦒","⦥","⟩","»","»","→","⥵","⇥","⤠","⤳","⤞","↪","↬","⥅","⥴","↣","↝","⤚","∶","ℚ","⤍","❳","}","]","⦌","⦎","⦐","ř","ŗ","⌉","}","р","⤷","⥩","”","”","↳","ℜ","ℛ","ℜ","ℝ","▭","®","®","⥽","⌋","𝔯","⇁","⇀","⥬","ρ","ϱ","→","↣","⇁","⇀","⇄","⇌","⇉","↝","⋌","˚","≓","⇄","⇌","‏","⎱","⎱","⫮","⟭","⇾","⟧","⦆","𝕣","⨮","⨵",")","⦔","⨒","⇉","›","𝓇","↱","]","’","’","⋌","⋊","▹","⊵","▸","⧎","⥨","℞","ś","‚","≻","⪴","⪸","š","≽","⪰","ş","ŝ","⪶","⪺","⋩","⨓","≿","с","⋅","⊡","⩦","⇘","⤥","↘","↘","§","§",";","⤩","∖","∖","✶","𝔰","⌢","♯","щ","ш","∣","∥","­","­","σ","ς","ς","∼","⩪","≃","≃","⪞","⪠","⪝","⪟","≆","⨤","⥲","←","∖","⨳","⧤","∣","⌣","⪪","⪬","⪬︀","ь","/","⧄","⌿","𝕤","♠","♠","∥","⊓","⊓︀","⊔","⊔︀","⊏","⊑","⊏","⊑","⊐","⊒","⊐","⊒","□","□","▪","▪","→","𝓈","∖","⌣","⋆","☆","★","ϵ","ϕ","¯","⊂","⫅","⪽","⊆","⫃","⫁","⫋","⊊","⪿","⥹","⊂","⊆","⫅","⊊","⫋","⫇","⫕","⫓","≻","⪸","≽","⪰","⪺","⪶","⋩","≿","∑","♪","¹","¹","²","²","³","³","⊃","⫆","⪾","⫘","⊇","⫄","⟉","⫗","⥻","⫂","⫌","⊋","⫀","⊃","⊇","⫆","⊋","⫌","⫈","⫔","⫖","⇙","⤦","↙","↙","⤪","ß","ß","⌖","τ","⎴","ť","ţ","т","⃛","⌕","𝔱","∴","∴","θ","ϑ","ϑ","≈","∼"," ","≈","∼","þ","þ","˜","×","×","⊠","⨱","⨰","∭","⤨","⊤","⌶","⫱","𝕥","⫚","⤩","‴","™","▵","▿","◃","⊴","≜","▹","⊵","◬","≜","⨺","⨹","⧍","⨻","⏢","𝓉","ц","ћ","ŧ","≬","↞","↠","⇑","⥣","ú","ú","↑","ў","ŭ","û","û","у","⇅","ű","⥮","⥾","𝔲","ù","ù","↿","↾","▀","⌜","⌜","⌏","◸","ū","¨","¨","ų","𝕦","↑","↕","↿","↾","⊎","υ","ϒ","υ","⇈","⌝","⌝","⌎","ů","◹","𝓊","⋰","ũ","▵","▴","⇈","ü","ü","⦧","⇕","⫨","⫩","⊨","⦜","ϵ","ϰ","∅","ϕ","ϖ","∝","↕","ϱ","ς","⊊︀","⫋︀","⊋︀","⫌︀","ϑ","⊲","⊳","в","⊢","∨","⊻","≚","⋮","|","|","𝔳","⊲","⊂⃒","⊃⃒","𝕧","∝","⊳","𝓋","⫋︀","⊊︀","⫌︀","⊋︀","⦚","ŵ","⩟","∧","≙","℘","𝔴","𝕨","℘","≀","≀","𝓌","⋂","◯","⋃","▽","𝔵","⟺","⟷","ξ","⟸","⟵","⟼","⋻","⨀","𝕩","⨁","⨂","⟹","⟶","𝓍","⨆","⨄","△","⋁","⋀","ý","ý","я","ŷ","ы","¥","¥","𝔶","ї","𝕪","𝓎","ю","ÿ","ÿ","ź","ž","з","ż","ℨ","ζ","𝔷","ж","⇝","𝕫","𝓏","‍","‌"]
|
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$comment": "Which <input> types each attribute applies to, from html-validate 11.16.4's input-attributes rule (MIT).",
|
|
3
|
+
"attributes": {
|
|
4
|
+
"accept": [
|
|
5
|
+
"file"
|
|
6
|
+
],
|
|
7
|
+
"alpha": [
|
|
8
|
+
"color"
|
|
9
|
+
],
|
|
10
|
+
"alt": [
|
|
11
|
+
"image"
|
|
12
|
+
],
|
|
13
|
+
"autocapitalize": [
|
|
14
|
+
"button",
|
|
15
|
+
"checkbox",
|
|
16
|
+
"color",
|
|
17
|
+
"date",
|
|
18
|
+
"datetime-local",
|
|
19
|
+
"file",
|
|
20
|
+
"hidden",
|
|
21
|
+
"image",
|
|
22
|
+
"month",
|
|
23
|
+
"number",
|
|
24
|
+
"radio",
|
|
25
|
+
"range",
|
|
26
|
+
"reset",
|
|
27
|
+
"search",
|
|
28
|
+
"submit",
|
|
29
|
+
"tel",
|
|
30
|
+
"text",
|
|
31
|
+
"time",
|
|
32
|
+
"week"
|
|
33
|
+
],
|
|
34
|
+
"autocomplete": [
|
|
35
|
+
"color",
|
|
36
|
+
"date",
|
|
37
|
+
"datetime-local",
|
|
38
|
+
"email",
|
|
39
|
+
"file",
|
|
40
|
+
"hidden",
|
|
41
|
+
"image",
|
|
42
|
+
"month",
|
|
43
|
+
"number",
|
|
44
|
+
"password",
|
|
45
|
+
"range",
|
|
46
|
+
"search",
|
|
47
|
+
"tel",
|
|
48
|
+
"text",
|
|
49
|
+
"time",
|
|
50
|
+
"url",
|
|
51
|
+
"week"
|
|
52
|
+
],
|
|
53
|
+
"capture": [
|
|
54
|
+
"file"
|
|
55
|
+
],
|
|
56
|
+
"checked": [
|
|
57
|
+
"checkbox",
|
|
58
|
+
"radio"
|
|
59
|
+
],
|
|
60
|
+
"colorspace": [
|
|
61
|
+
"color"
|
|
62
|
+
],
|
|
63
|
+
"dirname": [
|
|
64
|
+
"hidden",
|
|
65
|
+
"text",
|
|
66
|
+
"search",
|
|
67
|
+
"url",
|
|
68
|
+
"tel",
|
|
69
|
+
"email"
|
|
70
|
+
],
|
|
71
|
+
"height": [
|
|
72
|
+
"image"
|
|
73
|
+
],
|
|
74
|
+
"list": [
|
|
75
|
+
"text",
|
|
76
|
+
"search",
|
|
77
|
+
"url",
|
|
78
|
+
"tel",
|
|
79
|
+
"email",
|
|
80
|
+
"date",
|
|
81
|
+
"month",
|
|
82
|
+
"week",
|
|
83
|
+
"time",
|
|
84
|
+
"datetime-local",
|
|
85
|
+
"number",
|
|
86
|
+
"range",
|
|
87
|
+
"color"
|
|
88
|
+
],
|
|
89
|
+
"max": [
|
|
90
|
+
"date",
|
|
91
|
+
"month",
|
|
92
|
+
"week",
|
|
93
|
+
"time",
|
|
94
|
+
"datetime-local",
|
|
95
|
+
"number",
|
|
96
|
+
"range"
|
|
97
|
+
],
|
|
98
|
+
"maxlength": [
|
|
99
|
+
"text",
|
|
100
|
+
"search",
|
|
101
|
+
"url",
|
|
102
|
+
"tel",
|
|
103
|
+
"email",
|
|
104
|
+
"password"
|
|
105
|
+
],
|
|
106
|
+
"min": [
|
|
107
|
+
"date",
|
|
108
|
+
"month",
|
|
109
|
+
"week",
|
|
110
|
+
"time",
|
|
111
|
+
"datetime-local",
|
|
112
|
+
"number",
|
|
113
|
+
"range"
|
|
114
|
+
],
|
|
115
|
+
"minlength": [
|
|
116
|
+
"text",
|
|
117
|
+
"search",
|
|
118
|
+
"url",
|
|
119
|
+
"tel",
|
|
120
|
+
"email",
|
|
121
|
+
"password"
|
|
122
|
+
],
|
|
123
|
+
"multiple": [
|
|
124
|
+
"email",
|
|
125
|
+
"file"
|
|
126
|
+
],
|
|
127
|
+
"pattern": [
|
|
128
|
+
"text",
|
|
129
|
+
"search",
|
|
130
|
+
"url",
|
|
131
|
+
"tel",
|
|
132
|
+
"email",
|
|
133
|
+
"password"
|
|
134
|
+
],
|
|
135
|
+
"placeholder": [
|
|
136
|
+
"text",
|
|
137
|
+
"search",
|
|
138
|
+
"url",
|
|
139
|
+
"tel",
|
|
140
|
+
"email",
|
|
141
|
+
"password",
|
|
142
|
+
"number"
|
|
143
|
+
],
|
|
144
|
+
"popovertarget": [
|
|
145
|
+
"button"
|
|
146
|
+
],
|
|
147
|
+
"popovertargetaction": [
|
|
148
|
+
"button"
|
|
149
|
+
],
|
|
150
|
+
"readonly": [
|
|
151
|
+
"text",
|
|
152
|
+
"search",
|
|
153
|
+
"url",
|
|
154
|
+
"tel",
|
|
155
|
+
"email",
|
|
156
|
+
"password",
|
|
157
|
+
"date",
|
|
158
|
+
"month",
|
|
159
|
+
"week",
|
|
160
|
+
"time",
|
|
161
|
+
"datetime-local",
|
|
162
|
+
"number"
|
|
163
|
+
],
|
|
164
|
+
"required": [
|
|
165
|
+
"text",
|
|
166
|
+
"search",
|
|
167
|
+
"url",
|
|
168
|
+
"tel",
|
|
169
|
+
"email",
|
|
170
|
+
"password",
|
|
171
|
+
"date",
|
|
172
|
+
"month",
|
|
173
|
+
"week",
|
|
174
|
+
"time",
|
|
175
|
+
"datetime-local",
|
|
176
|
+
"number",
|
|
177
|
+
"checkbox",
|
|
178
|
+
"radio",
|
|
179
|
+
"file"
|
|
180
|
+
],
|
|
181
|
+
"size": [
|
|
182
|
+
"text",
|
|
183
|
+
"search",
|
|
184
|
+
"url",
|
|
185
|
+
"tel",
|
|
186
|
+
"email",
|
|
187
|
+
"password"
|
|
188
|
+
],
|
|
189
|
+
"src": [
|
|
190
|
+
"image"
|
|
191
|
+
],
|
|
192
|
+
"step": [
|
|
193
|
+
"date",
|
|
194
|
+
"month",
|
|
195
|
+
"week",
|
|
196
|
+
"time",
|
|
197
|
+
"datetime-local",
|
|
198
|
+
"number",
|
|
199
|
+
"range"
|
|
200
|
+
],
|
|
201
|
+
"value": [
|
|
202
|
+
"button",
|
|
203
|
+
"checkbox",
|
|
204
|
+
"color",
|
|
205
|
+
"date",
|
|
206
|
+
"datetime-local",
|
|
207
|
+
"email",
|
|
208
|
+
"hidden",
|
|
209
|
+
"month",
|
|
210
|
+
"number",
|
|
211
|
+
"password",
|
|
212
|
+
"radio",
|
|
213
|
+
"range",
|
|
214
|
+
"reset",
|
|
215
|
+
"search",
|
|
216
|
+
"submit",
|
|
217
|
+
"tel",
|
|
218
|
+
"text",
|
|
219
|
+
"time",
|
|
220
|
+
"url",
|
|
221
|
+
"week"
|
|
222
|
+
],
|
|
223
|
+
"width": [
|
|
224
|
+
"image"
|
|
225
|
+
]
|
|
226
|
+
}
|
|
227
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codelaw/rules-html",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "codelaw's rules for HTML (SR-RULE-PACKS)",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/arpitarya/codelaw.git"
|
|
9
|
+
},
|
|
10
|
+
"homepage": "https://github.com/arpitarya/codelaw",
|
|
11
|
+
"keywords": [
|
|
12
|
+
"codelaw",
|
|
13
|
+
"codelaw-pack",
|
|
14
|
+
"lint-rules"
|
|
15
|
+
]
|
|
16
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
description = "html-validate 11.16.4 a11y: the accessibility rules and WCAG techniques, reimplemented"
|
|
2
|
+
|
|
3
|
+
[rules]
|
|
4
|
+
"html/area-alt" = "error"
|
|
5
|
+
"html/aria-hidden-body" = "error"
|
|
6
|
+
"html/aria-label-misuse" = "error"
|
|
7
|
+
"html/button-type" = "error"
|
|
8
|
+
"html/empty-heading" = "error"
|
|
9
|
+
"html/empty-title" = "error"
|
|
10
|
+
"html/fieldset-legend" = "error"
|
|
11
|
+
"html/form-submit" = "error"
|
|
12
|
+
"html/hidden-focusable" = "error"
|
|
13
|
+
"html/img-alt" = "error"
|
|
14
|
+
"html/img-title" = "error"
|
|
15
|
+
"html/input-image-alt" = "error"
|
|
16
|
+
"html/link-text" = "error"
|
|
17
|
+
"html/meta-refresh" = "error"
|
|
18
|
+
"html/multiple-labeled-controls" = "error"
|
|
19
|
+
"html/no-abstract-role" = "error"
|
|
20
|
+
"html/no-autoplay" = "error"
|
|
21
|
+
"html/no-duplicate-id" = "error"
|
|
22
|
+
"html/no-redundant-aria-label" = "error"
|
|
23
|
+
"html/no-redundant-for" = "error"
|
|
24
|
+
"html/no-redundant-role" = "error"
|
|
25
|
+
"html/prefer-native-element" = "error"
|
|
26
|
+
"html/text-content" = "error"
|
|
27
|
+
"html/th-scope" = "error"
|
|
28
|
+
"html/unique-landmark" = "error"
|
|
29
|
+
"html/valid-autocomplete" = "error"
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
description = "html-validate 11.16.4 document: checks that only make sense for a complete page, reimplemented"
|
|
2
|
+
|
|
3
|
+
[rules]
|
|
4
|
+
"html/heading-level" = "error"
|
|
5
|
+
"html/input-missing-label" = "error"
|
|
6
|
+
"html/missing-doctype" = "error"
|
|
7
|
+
"html/no-missing-references" = "error"
|
|
8
|
+
"html/require-sri" = "error"
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
description = "html-validate 11.16.4 recommended, without its layout rules and the cosmetic rules its prettier and browser presets switch off, reimplemented"
|
|
2
|
+
|
|
3
|
+
[rules]
|
|
4
|
+
"html/area-alt" = "error"
|
|
5
|
+
"html/aria-hidden-body" = "error"
|
|
6
|
+
"html/aria-label-misuse" = "error"
|
|
7
|
+
"html/attribute-allowed-values" = "error"
|
|
8
|
+
"html/attribute-misuse" = "error"
|
|
9
|
+
"html/autocomplete-password" = "error"
|
|
10
|
+
"html/button-type" = "error"
|
|
11
|
+
"html/close-attr" = "error"
|
|
12
|
+
"html/close-order" = "error"
|
|
13
|
+
"html/deprecated" = "error"
|
|
14
|
+
"html/doctype-html" = "error"
|
|
15
|
+
"html/element-name" = "error"
|
|
16
|
+
"html/element-permitted-content" = "error"
|
|
17
|
+
"html/element-permitted-occurrences" = "error"
|
|
18
|
+
"html/element-permitted-order" = "error"
|
|
19
|
+
"html/element-permitted-parent" = "error"
|
|
20
|
+
"html/element-required-ancestor" = "error"
|
|
21
|
+
"html/element-required-attributes" = "error"
|
|
22
|
+
"html/element-required-content" = "error"
|
|
23
|
+
"html/empty-heading" = "error"
|
|
24
|
+
"html/empty-title" = "error"
|
|
25
|
+
"html/fieldset-legend" = "error"
|
|
26
|
+
"html/form-dup-name" = "error"
|
|
27
|
+
"html/form-submit" = "error"
|
|
28
|
+
"html/hidden-focusable" = "error"
|
|
29
|
+
"html/img-alt" = "error"
|
|
30
|
+
"html/img-title" = "error"
|
|
31
|
+
"html/input-attributes" = "error"
|
|
32
|
+
"html/input-image-alt" = "error"
|
|
33
|
+
"html/link-text" = "error"
|
|
34
|
+
"html/long-title" = "error"
|
|
35
|
+
"html/map-dup-name" = "error"
|
|
36
|
+
"html/map-id-name" = "error"
|
|
37
|
+
"html/meta-refresh" = "error"
|
|
38
|
+
"html/multiple-labeled-controls" = "error"
|
|
39
|
+
"html/no-abstract-role" = "error"
|
|
40
|
+
"html/no-autoplay" = "error"
|
|
41
|
+
"html/no-conditional-comment" = "error"
|
|
42
|
+
"html/no-deprecated-attr" = "error"
|
|
43
|
+
"html/no-dup-attr" = "error"
|
|
44
|
+
"html/no-dup-class" = "error"
|
|
45
|
+
"html/no-duplicate-id" = "error"
|
|
46
|
+
"html/no-implicit-close" = "error"
|
|
47
|
+
"html/no-implicit-input-type" = "error"
|
|
48
|
+
"html/no-multiple-main" = "error"
|
|
49
|
+
"html/no-utf8-bom" = "error"
|
|
50
|
+
"html/no-raw-characters" = "error"
|
|
51
|
+
"html/no-redundant-aria-label" = "error"
|
|
52
|
+
"html/no-redundant-for" = "error"
|
|
53
|
+
"html/no-redundant-role" = "error"
|
|
54
|
+
"html/prefer-button" = "error"
|
|
55
|
+
"html/prefer-native-element" = "error"
|
|
56
|
+
"html/prefer-tbody" = "error"
|
|
57
|
+
"html/script-element" = "error"
|
|
58
|
+
"html/script-type" = "error"
|
|
59
|
+
"html/tel-non-breaking" = "error"
|
|
60
|
+
"html/text-content" = "error"
|
|
61
|
+
"html/th-scope" = "error"
|
|
62
|
+
"html/unique-landmark" = "error"
|
|
63
|
+
"html/unrecognized-char-ref" = "error"
|
|
64
|
+
"html/valid-autocomplete" = "error"
|
|
65
|
+
"html/valid-for" = "error"
|
|
66
|
+
"html/valid-id" = "error"
|
|
67
|
+
"html/void-content" = "error"
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: html/area-alt
|
|
3
|
+
title: "Image-map areas with a link have alt text"
|
|
4
|
+
languages: [html]
|
|
5
|
+
fix: manual
|
|
6
|
+
fix_reason: "the text that describes the area needs a human"
|
|
7
|
+
stability: preview
|
|
8
|
+
options:
|
|
9
|
+
accessible: { type: "boolean", default: true, description: "require `alt` on every linked area, not just one area per link target" }
|
|
10
|
+
ported_from: [html-validate/area-alt]
|
|
11
|
+
tags: [a11y]
|
|
12
|
+
since: 0.1.0
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
An `<area>` with `href` has non-empty `alt` text, and an `<area>` without `href` has no `alt`.
|
|
16
|
+
|
|
17
|
+
**Why:** A screen reader announces a linked area by its `alt`; without it the link has no name.
|
|
18
|
+
|
|
19
|
+
```codelaw
|
|
20
|
+
native: html/area-alt
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## How to fix
|
|
24
|
+
|
|
25
|
+
1. Give each linked `<area>` an `alt` that says where it leads.
|
|
26
|
+
2. Remove `alt` from an `<area>` that has no `href`.
|
|
27
|
+
|
|
28
|
+
## Examples
|
|
29
|
+
|
|
30
|
+
### HTML
|
|
31
|
+
|
|
32
|
+
#### Don't
|
|
33
|
+
|
|
34
|
+
```html
|
|
35
|
+
<img src="floor.png" usemap="#floor" alt="Floor plan">
|
|
36
|
+
<map name="floor">
|
|
37
|
+
<area shape="rect" coords="0,0,50,50" href="/kitchen">
|
|
38
|
+
</map>
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
#### Do
|
|
42
|
+
|
|
43
|
+
```html
|
|
44
|
+
<img src="floor.png" usemap="#floor" alt="Floor plan">
|
|
45
|
+
<map name="floor">
|
|
46
|
+
<area shape="rect" coords="0,0,50,50" href="/kitchen" alt="Kitchen">
|
|
47
|
+
</map>
|
|
48
|
+
```
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: html/aria-hidden-body
|
|
3
|
+
title: "<body> is not aria-hidden"
|
|
4
|
+
languages: [html]
|
|
5
|
+
fix: suggest
|
|
6
|
+
fix_reason: "removing it exposes the page to screen readers again, which changes what users hear"
|
|
7
|
+
stability: preview
|
|
8
|
+
ported_from: [html-validate/aria-hidden-body]
|
|
9
|
+
tags: [a11y]
|
|
10
|
+
since: 0.1.0
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
`<body>` does not have `aria-hidden="true"`.
|
|
14
|
+
|
|
15
|
+
**Why:** It hides the whole page from assistive technology, while sighted users still see it.
|
|
16
|
+
|
|
17
|
+
```codelaw
|
|
18
|
+
native: html/aria-hidden-body
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Examples
|
|
22
|
+
|
|
23
|
+
### HTML
|
|
24
|
+
|
|
25
|
+
#### Don't
|
|
26
|
+
|
|
27
|
+
```html
|
|
28
|
+
<body aria-hidden="true">
|
|
29
|
+
<p>Welcome</p>
|
|
30
|
+
</body>
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
#### Do
|
|
34
|
+
|
|
35
|
+
```html
|
|
36
|
+
<body>
|
|
37
|
+
<p>Welcome</p>
|
|
38
|
+
</body>
|
|
39
|
+
```
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: html/aria-label-misuse
|
|
3
|
+
title: "aria-label is used only where it names something"
|
|
4
|
+
languages: [html]
|
|
5
|
+
fix: manual
|
|
6
|
+
fix_reason: "whether to move the label, add a role or use another element is a design decision"
|
|
7
|
+
stability: preview
|
|
8
|
+
options:
|
|
9
|
+
allowAnyNamable: { type: "boolean", default: false, description: "accept the label on any element ARIA lets be named, even where support is poor" }
|
|
10
|
+
ported_from: [html-validate/aria-label-misuse]
|
|
11
|
+
tags: [a11y]
|
|
12
|
+
since: 0.1.0
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
`aria-label` and `aria-labelledby` appear only on elements that can carry an accessible name: interactive and labelable elements, landmarks, elements with a `role` or `tabindex`, and a few others (`img`, `table`, `fieldset`, `dialog`, …).
|
|
16
|
+
|
|
17
|
+
**Why:** On a plain `<span>` or `<div>` screen readers ignore the label, so the text never reaches the user.
|
|
18
|
+
|
|
19
|
+
```codelaw
|
|
20
|
+
native: html/aria-label-misuse
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## How to fix
|
|
24
|
+
|
|
25
|
+
1. If the element acts as a control, use the matching element (`<button>`, `<a href>`) or add a `role`.
|
|
26
|
+
2. Otherwise put the text in the content, where everyone can read it, and remove the attribute.
|
|
27
|
+
|
|
28
|
+
## Examples
|
|
29
|
+
|
|
30
|
+
### HTML
|
|
31
|
+
|
|
32
|
+
#### Don't
|
|
33
|
+
|
|
34
|
+
```html
|
|
35
|
+
<span aria-label="Close">×</span>
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
#### Do
|
|
39
|
+
|
|
40
|
+
```html
|
|
41
|
+
<button type="button" aria-label="Close">×</button>
|
|
42
|
+
```
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# html/attribute-allowed-values — cases
|
|
2
|
+
|
|
3
|
+
### case: unknown elements are not checked
|
|
4
|
+
|
|
5
|
+
```html
|
|
6
|
+
<x-widget type="anything"></x-widget>
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
```expect
|
|
10
|
+
(none)
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
### case: template code is not checked
|
|
14
|
+
|
|
15
|
+
```html
|
|
16
|
+
<input type="{{ kind }}">
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
```expect
|
|
20
|
+
(none)
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
### case: boolean attribute written with its own name
|
|
24
|
+
|
|
25
|
+
```html
|
|
26
|
+
<input type="checkbox" checked="checked">
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
```expect
|
|
30
|
+
(none)
|
|
31
|
+
```
|