Releases: squizlabs/HTML_CodeSniffer
Releases · squizlabs/HTML_CodeSniffer
2.5.1
WCAG 2.1 Support
Support for WCAG 2.1
Thanks to @stefanruijsenaars HTMLCS now supports automated checks against parts of the WCAG 2.1 spec. There are many criteria which cannot be checked automatically and in these cases HTMLCS will show a notice
level message prompting for manual intervention.
Change list:
2.4.0
2.3.0
Change list.
- Various fixes submitted by @paazmaya including eslint, node/npm changes, grunt configuration & headless chrome.
- Fixed position of auditor if dragged above or below the visible window area. Solution submitted by @djdany01.
- jshint replaced with eslint for code standards checking
- SVG title elements are no longer treated as visible elements for contrast checking
- Now checks for submit buttons outside of a form element. Solution submitted by @fuzzbomb
- Improved support for tables that have spanned rows. Solution submitted by @mgwalker
- French translation submitted by @dmassiani
- Support for alpha in colour contrast checks submitted by @phillbaker
- Fixed a bug where messages relating to the parent document (only notices in this case) were not being included in the main message set.
2.2.0
Features
Translation
Basic string translation has been added and can be invoked in the Auditor via detection of the language in <html lang="{string}">
by default, or being specifically provided a language code in the Auditor options (see README.markdown).
Fixes
- #160 - Allow unmatched elements for 4.1.2 which are role='button' to use aria labels to pass as valid names for an accessibility API. This will trigger on any element using that role.
- #210 - Added 'range' to the list of input types that are tested for labels.
- #209 - Changed wrapping input label to detect any parent rather than just a direct parent.
- #191 - Now test for aria-hidden on element with role=presentation assigned and all parent nodes before checking any child elements that have semantic meaning.
- #204 - Tests for table headers now restricted to elements that belong to the table being tested rather than including possible child tables.
- #201 - No longer store and report on duplicate ids if the id is empty.
- #208 - No longer throws an obscure error when required by a node module.
2.1.1
2.1.0
aria-label
andaria-labelledby
support. Both attributes are now valid text label alternatives for:- Build updates:
- #152 - Text direction now explicitly set to left to right for the injected auditor CSS.
- #155 - Fixed font size calculations that incorrectly rounded computed font size down to the nearest integer which resulted in spurious contrast errors.
- #86 - Non-html5 doctypes are detected in checks for valid anchors.
- #88 - Elements that have event attributes that can be triggered via the keyboard (e.g.
onclick
) now test if the element is able to be accessed via the keyboard and provides a warning referencing G90. - #133 - Relaxed doctype detection to allow variations that in include transitional. Doctypes should now report correctly in most instances and will affect any checks that behaves differently based on doctype (e.g. named anchors vs id anchors in html4 vs html5).
- #147 - Fixed spurious colour contrast errors on absolutely positioned elements. Errors will no longer occur, but warnings should still be heeded as the contrast values will require human checks.
- #175 - Doctype detection will return null if it can't be detected and this wasn't being handled correctly on calling code.
- #72 - JSON format was added from a pull request and is now available when calling the phantomjs scripts. Call with
phantomjs Contrib/PhantomJS/HTMLCS_Run.js <url to check> json
. - #85 - Fixed text content extraction for given element. Was previously missing some use cases where text alternatives should have been provided.
- Presentation role and
aria-hidden
:- #151, #149 - Added support to detect and filter out elements from the main group of accessibility checks that should be hidden from accessibility APIs.
- Added new check for elements utilising role="presentation" to ensure they are used correctly (i.e. do not contain elements with semantic markup whose meaning will be lost).
- #169 - Resolved missing methods for Section508 checks.
- #163 - Merged pull request that trims query string from loaded urls (internal methods).
- #150 - Merged code quality fix.
- Various code quality fixes.