Skip to content

Commit 7b42677

Browse files
committed
Merge branch 'release-2.3.1' of github.com:browserstack/a11y-engine-axe-core into AXE-231-iframe
2 parents 8f84c27 + b004343 commit 7b42677

File tree

9 files changed

+42
-21
lines changed

9 files changed

+42
-21
lines changed

Gruntfile.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ module.exports = function (grunt) {
1515
grunt.loadTasks('build/tasks');
1616

1717
var langs;
18+
var wrapper = !!grunt.option('wrapper');
1819
if (grunt.option('lang')) {
1920
langs = (grunt.option('lang') || '').split(/[,;]/g).map(function (lang) {
2021
lang = lang.trim();
@@ -85,11 +86,11 @@ module.exports = function (grunt) {
8586
files: langs.map(function (lang, i) {
8687
return {
8788
src: [
88-
'lib/intro.stub',
89+
wrapper ? 'lib/custom/intro.stub' : 'lib/intro.stub',
8990
'<%= concat.engine.coreFiles %>',
9091
// include rules / checks / commons
9192
'<%= configure.rules.files[' + i + '].dest.auto %>',
92-
'lib/outro.stub'
93+
wrapper ? 'lib/custom/outro.stub' : 'lib/outro.stub'
9394
],
9495
dest: 'axe' + lang + '.js'
9596
};
@@ -127,7 +128,8 @@ module.exports = function (grunt) {
127128
entry: 'lib/commons/aria/index.js',
128129
destFile: 'doc/aria-supported.md',
129130
options: {
130-
langs: langs
131+
langs: langs,
132+
wrapper: wrapper
131133
},
132134
listType: 'unsupported' // Possible values for listType: 'supported', 'unsupported', 'all'
133135
}

build/tasks/aria-supported.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ module.exports = function (grunt) {
1616
* hence cannot be required at the top of the file.
1717
*/
1818
const done = this.async();
19-
const { langs } = this.options();
19+
const { langs, wrapper } = this.options();
20+
if (wrapper) return true;
2021
const fileNameSuffix = langs && langs.length > 0 ? `${langs[0]}` : '';
2122
const axe = require(`../../axe${fileNameSuffix}`);
2223
const listType = this.data.listType.toLowerCase();

doc/rule-descriptions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ Rules that check for conformance to WCAG AAA success criteria that can be fully
131131
| Rule ID | Description | Impact | Tags | Issue Type | ACT Rules |
132132
| :--------------------------------------------------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------------------------------------------- | :------- | :----------------------------------------------------------------------- | :------------------------- | :------------------------------------------------- |
133133
| [color-contrast-enhanced](https://dequeuniversity.com/rules/axe/4.9/color-contrast-enhanced?application=RuleDescription) | Ensures the contrast between foreground and background colors meets WCAG 2 AAA enhanced contrast ratio thresholds | Serious | cat.color, wcag2aaa, wcag146, ACT | failure, needs&nbsp;review | [09o5cg](https://act-rules.github.io/rules/09o5cg) |
134-
| [heading-order](https://dequeuniversity.com/rules/axe/4.9/heading-order?application=RuleDescription) | Ensures the order of headings is semantically correct | Moderate | cat.semantics, wcag2aaa, wcag2410, a11y-engine, a11y-engine-experimental | failure, needs&nbsp;review | |
134+
| [heading-order](https://dequeuniversity.com/rules/axe/4.9/heading-order?application=RuleDescription) | Ensures the order of headings is semantically correct | Moderate | cat.structure, wcag2aaa, wcag2410, a11y-engine, a11y-engine-experimental | failure, needs&nbsp;review | |
135135
| [identical-links-same-purpose](https://dequeuniversity.com/rules/axe/4.9/identical-links-same-purpose?application=RuleDescription) | Ensure that links with the same accessible name serve a similar purpose | Minor | cat.semantics, wcag2aaa, wcag249 | needs&nbsp;review | [b20e66](https://act-rules.github.io/rules/b20e66) |
136136
| [meta-refresh-no-exceptions](https://dequeuniversity.com/rules/axe/4.9/meta-refresh-no-exceptions?application=RuleDescription) | Ensures &lt;meta http-equiv=&quot;refresh&quot;&gt; is not used for delayed refresh | Minor | cat.time-and-media, wcag2aaa, wcag224, wcag325 | failure | [bisz58](https://act-rules.github.io/rules/bisz58) |
137137

lib/checks/navigation/heading-order.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"impact": "moderate",
77
"messages": {
88
"pass": "Heading order valid",
9-
"fail": "Heading order invalid",
9+
"fail": "Fix the order of headings. Headings should be in descending order of size without skipping levels. For example, <h2> should be followed by <h3>, not <h4> or <h5>.",
1010
"incomplete": "Unable to determine previous heading"
1111
}
1212
}

lib/custom/intro.stub

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
/*! axe v<%= pkg.version %>
2+
* Copyright (c) 2015 - <%= grunt.template.today("yyyy") %> Deque Systems, Inc.
3+
*
4+
* Your use of this Source Code Form is subject to the terms of the Mozilla Public
5+
* License, v. 2.0. If a copy of the MPL was not distributed with this
6+
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
7+
*
8+
* This entire copyright notice must appear in every copy of this file you
9+
* distribute or in any file that contains substantial portions of this source
10+
* code.
11+
*/
12+
const createAxe = () => (function axeFunction (window) {
13+
// A window reference is required to access the axe object in a "global".
14+
var global = window;
15+
var document = window.document;

lib/custom/outro.stub

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
2+
}( typeof window === 'object' ? window : this ));

lib/rules/heading-order.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"selector": "h1, h2, h3, h4, h5, h6, [role=heading]",
55
"matches": "heading-matches",
66
"tags": [
7-
"cat.semantics",
7+
"cat.structure",
88
"wcag2aaa",
99
"wcag2410",
1010
"a11y-engine",

package-lock.json

Lines changed: 14 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@
7171
"develop": "grunt dev --force",
7272
"api-docs": "jsdoc --configure .jsdoc.json",
7373
"build": "grunt",
74+
"build:wrapper": "grunt --wrapper=true",
7475
"eslint": "eslint --color --format stylish '{lib,test,build,doc}/**/*.js' 'Gruntfile.js'",
7576
"test": "npm run test:tsc && run-s \"test:unit:* -- {@}\" --",
7677
"test:tsc": "tsc",

0 commit comments

Comments
 (0)