html-validator
html-validator copied to clipboard
Update dependency html-validate to v8
This PR contains the following updates:
| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| html-validate (source) | 7.0.0 -> 8.24.0 |
Release Notes
html-validate/html-validate (html-validate)
v8.24.0
Features
v8.23.0
Features
- deps: support vitest v2 (860b0c0)
v8.22.0
Features
- api: make
DOMNodeconstructor internal (13377ac) - api: make
HtmlElementconstructor private (fbf4303) - deps: drop
@babel/code-framedependency (0003ffd) - deps: update @sidvind/better-ajv-errors to v3 (3112289)
Bug Fixes
- deps: update dependency ignore to v5.3.2 (9d86e68)
v8.21.0
Features
- api: add
DOMTree.readyState(1f6f69b) - api: deprecate
DOMTree.find(..)in favour ofquerySelector(..)(ac0bb77) - api: internal methods of
DOMTreeremoved from public API (79a03be) - api: new
walk.depthFirst(..)API to replace now deprecatedDOMTree.visitDepthFirst(..)method (f9dbda0)
Bug Fixes
- html5:
spellcheckis a global attribute (46594a1)
v8.20.1
Bug Fixes
- rules: fix
attribute-allowed-valueserror location for empty values (2c04eeb)
v8.20.0
Features
- api: new
setConfigmethod onStaticConfigLoaderto change config (1bf7559) - api: new getter/setter for configuration loader (6283091)
v8.19.1
Bug Fixes
- rules:
wcag/h36no longer reports for hidden elements (aba06d1) - rules:
wcag/h37no longer validates<input type="submit">(usewcag/h36instead) (e82b17a), closes #254 - rules: make
wcag/h36have better message and location (8a80cc8)
v8.19.0
Features
Bug Fixes
- rules:
multiple-labeled-controlshandles hidden input (4d794b6), closes #251 - rules:
wcag/h30only applies to<a href>(cd93dfe), closes #252 - rules: handle unicode letters in
valid-id(c83687a), closes #253
v8.18.2
Bug Fixes
v8.18.1
Bug Fixes
- rules:
form-dup-namehandles<template>element (9c77444), closes #247 - rules:
no-dup-idhandles<template>element (04f3e0d), closes #247
v8.18.0
Features
- rules: new pattern
bemfor pattern rules (c1ead1b) - rules: new pattern
snakecasefor pattern rules (4b95ccb), closes #245
Bug Fixes
- rules: disallow consecutive hyphens and underscors for kebab-case and snake_case (a4338a7), closes #246
- rules: require initial character for all patterns to be letter (646ff16)
v8.17.1
Bug Fixes
v8.17.0
Features
- rules: new rule
name-pattern(f2209c0), closes #216 - rules: support multiple patterns in
id-pattern,class-patternandname-patternrules (15dd007)
Bug Fixes
- meta: handle regexp with slash inside (4c88396), closes #242
- rules:
input-missing-labelnow ignores<input>hidden by css (c40e48e), closes #241 - rules:
input-missing-labelnow tests if<label>is inert or hidden by css (d0d6f40) - rules: show pattern name in
id-pattern,class-patternandname-patternrules (4bd70ab)
v8.16.0
Features
- api: new
tabIndexproperty reflecting the parsedtabindexattribute (a4e5d5b) - meta: add
inertas global attribute (a5e6477) - meta: new
formAssociated.disablableproperty (0b141ab)
Bug Fixes
- html5:
<summary>element is focusable if child of<details>(79dec74) - rules:
hidden-focusablehandles inert elements (89bb969), closes #240 - rules:
hidden-focusableno longer reports for disabled form controls (d337397) - rules:
hidden-focusableno longer reports for elements withtabindex="-1"(03d7223), closes #240
v8.15.0
Features
- rules: new rule
valid-autocomplete(bebd0d1)
Bug Fixes
- rules: case-insensitive match for
urlinmeta-refresh(3177295)
v8.14.0
Features
- rules: new option
allowLongDelaytometa-refreshto allow 20h+ delays (629625c)
v8.13.0
Features
- meta: allow
<link>under<body>if appropriaterelattribute is present (ae1e070) - meta: allow content categories to be a callback (0eb4e77)
- meta: disallow invalid rel attribute keywords (dc36cfb)
v8.12.0
Features
- rules: new rule
no-abstract-role(923680b)
v8.11.1
Bug Fixes
- dom: fix regression error with selectors ending with characters
a,dor9(a9a9ef9)
v8.11.0
Features
- html5: add new property
aria.namingrepresenting if the element can be named (4fca264) - html5: update role metadata from html-aria standard (b029a3f)
- meta: move
implicitRoletoaria.implicitRole(bc8cacf)
Bug Fixes
- handle selectors containing tabs and newlines (5e45d54), closes #238
- rules: new option
allowAnyNamableforaria-label-misuse(c08a3ba), closes #237
v8.10.0
Features
- rules: new rule
no-implicit-input-type(6cc0c6d)
Bug Fixes
- deps: update dependency ignore to v5.3.1 (4553b89)
- html5:
typefor<input>no longer required (37284d0), closes #235 - rules: change wording required to recommended in
no-implicit-button-type(1926c06)
v8.9.1
Bug Fixes
- rules:
<form>and<section>without explicit accessible name is no longer considered landmark (a36deac) - rules:
<header>and<footer>nested in<main>or sectioning content is no longer considered landmark (bcab354), closes #234
v8.9.0
Features
- elements: new property
focusableto mark elements as focusable (c59c8b2) - rules: new rule
hidden-focusable(243e7fb) - rules: new rule
unique-landmark(187be1e)
Bug Fixes
- api: remove internal
listenersproperty from public API (303e5d5) - dom: ancestor with
role="presentation"no longer counts decendants as missing from a11y tree (cc72da1) - dom: handle
role="none"as a synonym forrole="presentation"(b1d7b50) - dom: interactive and focusable elements ignore
role="presentation"(017308f) - rules: better error description for
require-sri(ffc3695) - rules: rule
wcag/h30no longer requires text on<a hidden>(a20cc84) - rules: rule
wcag/h30no longer requires text on links withdisplay: noneorvisibility: hidden(36ff07e) - rules: rules
wcag/h32handles<button>without explicittype(84c6a6e)
v8.8.0
Features
- api:
Report.merge()can merge async results (35689fc) - api: rename
nodejsResolvertocjsResolver(8c72c8f) - config: new
defineConfighelper (35e265a)
Bug Fixes
- config: proper error message when certain configuration properties was invalid (b029569)
v8.7.4
Bug Fixes
- deps: pin @sidvind/better-ajv-errors (94f778b), closes #231
- deps: support vitest v1 (4cc4d23)
v8.7.3
Bug Fixes
- disable
doctype-stylewhen using prettier preset (f1f4004)
v8.7.2
Bug Fixes
- deps: update dependency ignore to v5.3.0 (143e994)
v8.7.1
Bug Fixes
- rules: fix
form-dup-nameissue when more than two names are present in array (5d9ff3b), closes #228
v8.7.0
Features
- html5: support
referrerpolicyattribute (851b559)
v8.6.1
Bug Fixes
- dom: remove usage of regex negative lookbehind (f406393), closes #147
- rules: improve
attribute-misuseerror message (fccce69), closes #226 - typo in CONTRIBUTING.md (855bacf)
v8.6.0
Features
- api: add
meta: MetaAttributeinAttributeEvent(2cda0ae) - cli:
--ruleseverity can now be set with strings, fixes #225. (054972e)
v8.5.0
Features
v8.4.1
Bug Fixes
- rules: fix contextual documentation for
attr-patternrule (0082aef)
v8.4.0
Features
- html5: support
<search>element (720bdd9) - new
implicitRolemetadata for better handling of implicit ARIA roles (fe45ec4), closes #224
v8.3.0
Features
Bug Fixes
- html5:
<label>cannot have emptyfor(3626e1a), closes #223 - html5:
element-required-attributesallows<button>withouttype(useno-implicit-button-typeinstead) (d32f492), closes #221
v8.2.0
Features
- add
allowedIfParentIsPresentmetadata helper (2668899) - html5: add
<source>attributes metadata (e3a3311) - support passing native
HTMLElementto metadata helpers (8af6d01), closes #207
Bug Fixes
- api: typing for
Rule.setSeverity()changed to only acceptSeverity(64f4210)
v8.1.0
Features
Bug Fixes
- add
compatibilityCheckfunction to browser bundle (b89dcc2) - api: remove unintended
nullreturn value from plugins api (0eb0ea8)
v8.0.5
Bug Fixes
- fix import issue with
elements/html5.js(0604c21), closes #219 - make
elements/html5work with esm (d95de27)
v8.0.4
Bug Fixes
- add explicit node import (73f9a1f)
v8.0.3
Bug Fixes
- fix regression bug when using
elementsin extended configuration files and plugins (6892083) - use correct dts when using custom conditions (1b6971e)
v8.0.2
Bug Fixes
- add
browsercondition for main import (d2f7a74) - remove usage of
node:pathandprocessin browser build (2580aeb)
v8.0.1
Bug Fixes
- fix nodejs code being included in browser bundle (7c76a3b)
v8.0.0
⚠ BREAKING CHANGES
See {@link migration migration guide} for details.
- api: The
ConfigFactoryparameter toConfigLoader(and its child classesStaticConfigLoaderandFileSystemConfigLoader) has been removed. No replacement.
If you are using this you are probably better off implementing a fully custom
loader later returning a ResolvedConfig.
- api: A new
getContextualDocumentationreplaces the now deprecatedgetRuleDocumentationmethod. The context parameter togetRuleDocumentationis now required and must not be omitted.
For rule authors this means you can now rely on the context parameter being
set in the documentation callback.
For IDE integration and toolchain authors this means you should migrate to use
getContextualDocumentation as soon as possible or if you are continuing to use
getRuleDocumentation you are now required to pass the config and context
field from the reported message.
- api: This change affect API users only, specifically API users
directly using the
Configclass. Additionally when using theStaticConfigLoaderno modules will be resolved usingrequire(..)by default any longer. Instructions for running in a browser is also updated, see below.
To create a Config instance you must now pass in a Resolver (single or
array):
+const resolvers = [ /* ... */ ];
-const config = new Config( /* ... */ );
+const config = new Config(resolvers, /* ... */ );
This applies to calls to Config.fromObject(..) as well.
The default resolvers for StaticConfigLoader is StaticResolver and for
FileSystemConfigLoader is NodeJSResolver. Both can optionally take a new set
of resolvers (including custom ones).
Each resolver will, in order, try to load things by name. For instance, when
using the NodeJSResolver it uses require(..) to load new items.
NodeJSResolver- usesrequire(..)StaticResolver- uses a predefined set of items.- api: The
HtmlValidateclass now has aPromisebased API where most methods return a promise. The old synchronous methods are renamed.
Either adapt to the new asynchronous API:
-const result = htmlvalidate.validateFile("my-awesome-file.html");
+const result = await htmlvalidate.validateFile("my-awesome-file.html");
or migrate to the synchronous API:
-const result = htmlvalidate.validateFile("my-awesome-file.html");
+const result = htmlvalidate.validateFileSync("my-awesome-file.html");
For unittesting with Jest it is recommended to make the entire test-case async:
-it("my awesome test", () => {
+it("my awesome test", async () => {
const htmlvalidate = new HtmlValidate();
- const report = htmlvalidate.validateString("...");
+ const report = await htmlvalidate.validateString("...");
expect(report).toMatchCodeFrame();
});
- api:
ConfigLoadermust returnResolvedConfig. This change affects API users who implements custom configuration loaders.
In the simplest case this only requires to call Config.resolve():
-return config;
+return config.resolve();
A resolved configuration cannot further reference any new files to extend, plugins to load, etc.
- api: The
TemplateExtractorclass has been moved to the@html-validate/plugin-utilspackage. This change only affects API users who use theTemplateExtractorclass, typically this is only used when writing plugins. - config: Deprecated severity alias
disabledremoved. If you use this in your configuration you need to update it tooff.
{
"rules": {
- "my-awesome-rule": "disabled"
+ "my-awesome-rule": "off"
}
}
- rules: The
voidrule has been removed after being deprecated a long time, it is replaced with the separatevoid-content,void-styleandno-self-closingrules. - deps: minimum required node version is v16
- deps: minimum required jest version is v27
Features
- api:
ConfigLoadermust returnResolvedConfig(d685e6a) - api:
FileSystemConfigLoadersupports passing a customfs-like object (fac704e) - api: add
Promisebased API toHtmlValidateclass (adc7783) - api: add
Resolverclasses as a mean to separatefsfrom browser build (3dc1724) - api: new
getContextualDocumentationto replacegetRuleDocumentation(60c9a12) - api: remove
ConfigFactory(e309d89) - api: remove
TemplateExtractorin favour of@html-validate/plugin-utils(a0a512b) - deps: minimum required jest version is v27 (dc79b6b)
- deps: minimum required node version is v16 (f6ccdb0)
- rules: remove deprecated
voidrule (3e727d8)
Bug Fixes
- config: remove deprecated severity alias
disabled(6282293)
v7.18.1
Bug Fixes
- cli: error message on missing --config file (e948a18)
v7.18.0
Features
Bug Fixes
- api: mark
Config.fromFile()as internal (3e70028) - api: mark
Config.getMetaTable()as internal (8cb6dd0) - api: mark
dumpEvents,dumpSource,dumpTokensanddumpTreeas internal (866f219) - jest:
toMatchCodeframeandtoMatchInlineCodeframehandles async result (584c67e)
v7.17.0
Features
- allow to specify plugins inline in configuration (6ba1467)
Bug Fixes
- rules: allow custom elements to use
aria-label(513a813)
v7.16.0
Features
- api:
ConfigLoaderreturns aResolvedConfig(1fd8b73)
Dependency upgrades
- deps: update dependency @html-validate/stylish to v4 (2a089ec)
v7.15.3
Bug Fixes
- api: remove unused
urlimport (a2017ff)
v7.15.2
Bug Fixes
- api: fix typescript not finding type declarations (0950bb9), closes #217
- rules:
form-dup-namedefaults to allow<button type="submit">to share name (b39b9ad), closes #212
Dependency upgrades
- deps: update dependency glob to v10 (1855cf0)
v7.15.1
Bug Fixes
- add missing exports (7fb141d)
- fix
html-validate/test-utilsentrypoint (62fbee3) - include tsdoc-metadata.json (61dd7dd)
v7.15.0
Features
- dts rollup (9743e9c)
Bug Fixes
- dom:
querySelectortypescript declaration returns null to match implementation (9c9befe) - fix browser entrypoint for older bundlers (c8320ba)
v7.14.0
Features
- rules: add
[role="alertdialog"]as a default sectioning root forheading-level(b87581a)
Bug Fixes
- cli: fix glob pattern when file extension list is empty (d95a418)
Dependency upgrades
- deps: update dependency glob to v9 (effd3bc)
v7.13.3
Bug Fixes
v7.13.2
Bug Fixes
- add button and reset types to form-dup-name shared options (d6ef9f8)
v7.13.1
Bug Fixes
no-unused-disableproperly reports location when more than two rules are disabled (26d1970)- allow
no-unused-disableto be disabled by directive (b11166c)
v7.13.0
Features
- expose
Validatorhelper (6ef10dd), closes #204 - report unused disable directives (5a2731f), closes #196
v7.12.2
Bug Fixes
form-dup-namevalidate checkboxes by default (d5e7b7d), closes #202- add
allowArrayBracketsoption toform-dup-namerule (a43ea0b), closes #203 - add
sharedoption toform-dup-nameto set which controls allow shared names (7ddc02b), closes #201
v7.12.1
Bug Fixes
v7.12.0
Features
- api:
Attribute.valueMatchescan take array of keywords to match against (0a5ff8e) - api: add
Rule.getMetaFor(..)(5a76381) - api: add new
formAssociatedproperty when defining metadata (3d56c4a) - meta:
MetaAttributeAllowedCallbacktakes the attribute as second argument (7a4edeb) - rules: new rule
form-dup-name(74f8e2d), closes #197 - rules: new rule
map-id-name(abe5acb), closes #184
Bug Fixes
- parser: enable cache api on document root (a1cfe64)
v7.11.1
Bug Fixes
- allow setting metadata attribute to
nullto remove it (7118d9b) - better error message when element inheritance fails (717c186)
v7.11.0
Features
- api: add
keywordPatternMatcherfor usage withinclude/excludeoptions (6bd360f) - rules: add
includeandexcludesupport tono-unknown-elements(cd7fb23) - validateOccurrences and element-permitted-occurences support tag category (b37d9ac)
Bug Fixes
- hgroup is still valid, support the current content model (4040db3), closes #198
- rules: improve error message for
wcag/h63(fa16f51) - rules: improved error message with
element-required-contentusing categories (a71a2d8)
v7.10.1
Bug Fixes
- allow
aswithprefetch(54ceeb1)
v7.10.0
Features
- rules: add
wcag/h63for header cell scopes (ee012c6)
Bug Fixes
- html5:
<th>does not requirescopeattribute (44bb935), closes #189 - rules:
empty-headinghandleshiddenattribute (e33b55e), closes #193 - rules:
wcag/h30handleshiddenattribute (c5ac930)
v7.9.0
Features
- new
definePluginhelper (e28c275) - rules: new option
ignoreCaseadded tounrecognized-char-ref(4a1b9af) - rules: new option
requireSemicolonadded tounrecognized-char-ref(b7a5067) - rules: new rule
map-dup-name(ad7bfff), closes #180
Bug Fixes
- rules: add selector to
unrecognized-char-referrors (73b29ef) - rules: include different capitalization for named character references (html entities) (83f205a), closes #192
v7.8.0
Features
- html5: bundle element metadata (1e59f3e)
Bug Fixes
- api:
getFormatterts declaration guarantees aFormatterwill be returned for known formatters (14ce8b1)
v7.7.1
Bug Fixes
- api: export browser bundle as
html-validate/browser(dc1c322) - html5: handle
<meta property>(RDFa such as OG) (63e8814), closes #187
v7.7.0
Features
- html5: validates
<a target>and<area target>for valid keywords (6fa0bd9) - new
defineMetadatahelper for writing custom element metadata (6a06811), closes #186 - rules: new rule
area-alt(3c1f0b3), closes #178 - rules: new rule
attribute-misuse(07a0bbe), closes #181
Bug Fixes
- html5:
<map>requiresnameattribute (6104eb3) - html5:
<meta charset>should only allowutf-8(aaa15fe) - html5: disallow
<area coords>whenshapeisdefault(76115f2), closes #183 - html5: mark
<keygen>as deprecated (859402d) - html5: require
<area coords>whenshapeis requires is (ed750c1), closes #182
v7.6.0
Features
input-missing-labelchecks for presence of text (4aa7d77), closes #170- api: add
HtmlElement.ariaLabelledby(8463d43) - api: expose
classifyNodeTexthelper (97621fd) - api: new rule helper
hasAccessibleText(b8f8330) - rules:
classifyNodeTexthelper respectshiddenandaria-hiddenattributes (8ba2c5a) - rules:
classifyNodeTextoption to ignore hidden attribute on element (41ba7f9) - rules:
isHTMLHiddenandisAriaHiddencan return detailed results (fb28c2e)
Bug Fixes
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
- [ ] If you want to rebase/retry this PR, check this box
This PR was generated by Mend Renovate. View the repository job log.