Skip to main content

Rules

Conformance checkingโ€‹

Rule IDFixableDescription
attr-duplication๐Ÿ”งWarns that attributes were duplicated in one element. Capital letters and lower-case letters are not distinguished.
correct-aspect-ratioWarns when the width/height attributes of an img or source element do not match the actual image aspect ratio.
deprecated-attrWarns when there is an attribute defined as deprecated or obsolete.
deprecated-elementWarns when there is an element defined as deprecated or obsolete.
disallowed-elementWarns if specified elements appear on a document or an element.
doctypeWarns when doesn't including DOCTYPE.
heading-levelsWarns for skipped heading levels
id-duplicationWarns that id attribute value were duplicated in one document.
invalid-attrWarn if an attribute is a non-existent attribute or an invalid type value due to the specifications (or the custom rule).
link-typesValidates link type keywords in the rel attribute against the WHATWG standard.
no-duplicate-dtNo duplicate names in <dl>
no-empty-palpable-contentWarn if there is an empty palpable content element.
no-orphaned-end-tag๐Ÿ”งWarns when an end tag appears without a corresponding start tag, which constitutes an inner parse error in HTML Standard.
no-unsupported-featuresWarns when using HTML elements or attributes not supported by target browsers, or that are experimental/non-standard.
permitted-contentsWarn if a child element has a not allowed element or text node.
placeholder-label-optionChecking whether the select element needs the placeholder label option.
require-datetimeWarn to need the datetime attribute if the time element has invalid content.
required-attrWarns if specified attributes or required attribute on specs are not appeared on an element.
required-elementRequired elements
srcset-sizes-constraintEnforces WHATWG constraints between srcset, sizes, and loading attributes.

Accessibilityโ€‹

Rule IDFixableDescription
label-has-controlWarns if the label element has no control.
landmark-rolesWhether banner, main, complementary and contentinfo are top-level landmarks. Whether a specific landmark role has unique label when used multiple times on a page
neighbor-popoversWarns when popover triggers and their corresponding targets are not adjacent
no-ambiguous-navigable-target-namesPrevents typographical errors in links and more that could inadvertently replace special navigational keywords (_blank, _self, _parent, _top) with invalid target names, ensuring navigations behave as intended.
no-consecutive-br๐Ÿ”งWarns against the use of consecutive <br> tags
no-refer-to-non-existent-idCheck whether the ID or the list of ID specified to for, form, aria-*, and more, or a fragment in a hyperlink are referencing it that existed in the same document.
undefinedundefined
require-accessible-nameWarn if the element has no accessible name.
require-dialog-autofocusRequires a dialog shown via the show-modal command to contain an element with the autofocus attribute
required-h1Warn if there is no h1 element in the document.
table-row-column-alignmentChecks for consistency in the defined number of rows and columns.
use-listPrompt to use list element when a bullet character is at the start of a text node.
wai-ariaWarn if the role attribute and aria-* attributes don't set in accordance with specs that are WAI-ARIA and ARIA in HTML.

Naming Conventionโ€‹

Rule IDFixableDescription
class-namingWarn if the class name does not conform to the specified rules.

Maintainabilityโ€‹

Rule IDFixableDescription
no-hard-code-idWarn it hard-coded the value of the id attribute when the element is a fragment.
no-use-event-handler-attrWarn when specifying the event handler attribute.

Styleโ€‹

Rule IDFixableDescription
attr-order๐Ÿ”งEnforces a consistent order of attributes on elements.
attr-value-quotes๐Ÿ”งWarns if the attribute value is not quoted.
case-sensitive-attr-name๐Ÿ”งWarns that the attribute name is not in one of uppercase or lowercase letters.
case-sensitive-tag-name๐Ÿ”งWarns that the tag name is not in one of uppercase or lowercase letters.
character-referenceWarns when unauthorized illegal characters are not escaped with character reference in the text node or attribute value.
end-tagWarn if there is not an end tag.
head-element-order๐Ÿ”งWarns if elements within <head> are not in the expected order.
ineffective-attr๐Ÿ”งWarn that if the attribute specified cannot affect (in other words, mean-less) the element.
no-boolean-attr-value๐Ÿ”งWarn when it specified any value to the boolean attribute.
no-default-value๐Ÿ”งWarn when it specifies the default value to the attribute.

Removed rulesโ€‹

Rule IDFixableDescriptionDrop
attr-equal-space-afterSpaces after the equal of attributeSince v3.0
attr-equal-space-beforeSpaces before the equal of attributeSince v3.0
attr-spacingSpaces between attributesSince v3.0
indentationIndentationSince v3.0