html-validate
Advanced tools
Changelog
0.22.0 (2019-02-24)
HtmlElement
direct access to attr
is replaced with attributes
. The
former was an key-value object and the latter is a flattened array of
Attribute
.Source
and AttributeData
in shim.HtmlElement
will now store duplicated (or aliased) attributes. The biggest
change this introduces is that classList
will now contain a merged list of
all classes. This is needed when combining a static class
attribute with a
dynamic one.Attribute
got two flags isStatic
and isDynamic
to easily tell if the
value is static or dynamic.processAttribute
hook to yield multiple attributes, typically used
when adding aliased attributes such as :class
. By adding both the alias and
the original the latter can be validated as well (e.g. no-dup-attr
can
trigger for multiple uses of :class
). (fixes #36)HtmlValidate.validateString
, makes it easier
to write tests which requires hooks, e.g. processing attributes.[attr]
selector now matches boolean attributes.attribute-boolean-style
and no-dup-attr
now handles when dynamic
attributes is used to alias other attributes, e.g :required="foo"
no longer
triggers an boolean style and class=".."
combined with :class=".."
no
longer triggers duplicate attributes. (fixes #35)attribute-allowed-values
now ignores boolean attributes with dynamic
values. (partially fixes #35)Changelog
0.21.0 (2019-02-17)
button-type
is replaced with element-required-attributes
.element-required-attributes
replaces button-type
and allows any
element to contain requiredAttributes
metadata.--dump-events
output reduced by hiding element metadata and compacting
location data.<area shape="default">
(fixes #31)Changelog
0.20.1 (2019-02-06)
wcag/h37
and wcag/h67
checks if node exists before testing
tagname.attribute-allowed-values
.Changelog
0.20.0 (2019-01-29)
codeframe
formatter to show not just start location but also end.Changelog
0.19.0 (2019-01-27)
img-req-alt
has been renamed wcag/h37
.prefer-button
.Attribute
now stores location of value.wcag/h32
and wcag/h67
.location
and isRootElement
to DOMNode
and add new nodeType
property.Attribute.valueMatches
to test attribute value. Handles DynamicValue
.querySelector
now handles selector lists (comma-separated selectors)Changelog
0.18.2 (2019-01-14)
getAttributeValue
on a boolean attribute.DynamicValue
in DOMTokenList
and id-pattern
.Changelog
0.18.1 (2019-01-12)
--print-config
to output configuration for a given file.Changelog
0.18.0 (2019-01-10)
parseAttribute
hook, e.g :id="..."
can yield attribute id
with a dynamic
value.parseAttribute
allowing the transformer to alter the attribute before any events are emitted,
e.g. it can pick up the vuejs :id
attribute and pass it as id
to allow
other rules to continue just as if id
was typed.ConfigLoader
tests when running on windows.Changelog
0.17.0 (2019-01-09)
DOMNode
has been renamed HtmlElement
and there is instead a new base class
DOMnode
which HtmlElement
extends from. Rules using DOMNode
need to be
changed to use HtmlElement
.HtmlValidate.getRuleDocumentation()
API for IDEs to fetch contextual
rule documentation.codeframe
formatter (from eslint).HtmlValidate.flushConfigCache
to allow flushing the config loader cache.TemplateExtractor.createSource
as a quick way to create a source from
filename.shim.js
validateSource
to HtmlValidate
allowing to manually passing a source.HtmlValidate.getConfigFor
is now part of public API.dom:ready
event.HtmlElement
location is now shifted by 1.