Commit 6d6e091a authored by Mike Jackson's avatar Mike Jackson Committed by Commit Bot

Revert "Reland "Update axe-core to v3.3.2""

This reverts commit b1540bd6.

Reason for revert: Breaks http/tests/devtools/a11y-axe-core/basic-a11y-test.js and 5 other(s), see issue 1004150 (on Linux)

Original change's description:
> Reland "Update axe-core to v3.3.2"
>
> This is a reland of 0f435b65
>
> Original change's description:
> > Update axe-core to v3.3.2
> >
> > This change updates the version of axe-core to the latest released
> > version. As part of picking up the latest version, the following
> > additional changes were made:
> >
> > 1) axe-core removed the 'href-no-hash' rule, so that been removed
> >    from the test list.
> >
> > 2) Several 'link-in-text-block' tests started failing with
> >    axe-core v3.0.2 (and later). These tests do pass in v3.0.1, but
> >    are disabled as part of this change.
> >      - CrManagementA11yTest.SimpleTest_link_in_text_block
> >      - CrManagementA11yTestWithExtension.
> >                                 ExtensionSection_link_in_text_block
> >      - CrostiniAccessibilityTest.CROSTINI_link_in_text_block
> >      - CrExtensionsA11yTest.NoExtensions_link_in_text_block
> >      - MultideviceA11yTest.MULTIDEVICE_link_in_text_block
> >      - MultideviceFeaturesA11yTest.
> >               MULTIDEVICE_FEATURES_ACCESSIBILITY_link_in_text_block
> >
> > 3) One 'heading-order' test started failing in v3.0.0 (and later).
> >    This tests does pass in V2.4.2, but is disabled as part of this
> >    change.
> >      - CrExtensionsA11yTestWithMultipleExensions.
> >                                        WithExtensions_heading_order
> >
> > I spent some time investigating the test failures, and it looks
> > like axe-core is highlighting legitimate product issues.
> >
> > Change-Id: I99c1f85087aea873e29b413dca967864fc93c786
> > Bug: 984817
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1790125
> > Reviewed-by: Hector Carmona <hcarmona@chromium.org>
> > Reviewed-by: Alice Boxhall <aboxhall@chromium.org>
> > Commit-Queue: Mike Jackson <mjackson@microsoft.com>
> > Cr-Commit-Position: refs/heads/master@{#695885}
>
> The original change caused failures in the Deterministic Linux builds.
> This was due to devtools tests taking a dependency on axe.js, but not
> declaring that dependency in the build.gn file. This has been fixed
> in this change.
>
> Bug: 984817
> Change-Id: I0e55bae8014654ba92afb69bb6ff8d553c018126
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1800003
> Reviewed-by: Alice Boxhall <aboxhall@chromium.org>
> Reviewed-by: Pavel Feldman <pfeldman@chromium.org>
> Reviewed-by: Hector Carmona <hcarmona@chromium.org>
> Commit-Queue: Mike Jackson <mjackson@microsoft.com>
> Cr-Commit-Position: refs/heads/master@{#696545}

TBR=aboxhall@chromium.org,pfeldman@chromium.org,hcarmona@chromium.org,luoe@chromium.org,mjackson@microsoft.com

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: 984817, 1004150
Change-Id: I5dc2d939ebcf338d8bd6a5ca95d41a25afc5d57f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1806414
Commit-Queue: Mike Jackson <mjackson@microsoft.com>
Reviewed-by: default avatarYang Guo <yangguo@chromium.org>
Reviewed-by: default avatarDominik Röttsches <drott@chromium.org>
Cr-Commit-Position: refs/heads/master@{#696747}
parent bc9a3027
......@@ -98,8 +98,6 @@ js2gtest("browser_tests_js_webui") {
"webui_resource_async_browsertest.js",
]
gen_include_files = [ "a11y/accessibility_audit_rules.js" ]
extra_js_files = [
"test_browser_proxy.js",
"settings/test_password_manager_proxy.js",
......
......@@ -52,6 +52,7 @@ AccessibilityTest.ruleIds = [
'frame-title',
'heading-order',
'hidden-content',
'href-no-hash',
'html-has-lang',
'html-lang-valid',
'image-alt',
......
......@@ -56,16 +56,6 @@ var CrExtensionsA11yTest = class extends PolymerTest {
return parentNode && parentNode.host &&
parentNode.host.tagName == 'CR-TOGGLE';
},
// TODO(crbug.com/1002620): this filter can be removed after
// addressing the bug
'heading-order': function(nodeResult) {
// Filter out 'Heading levels do not increase by one' error when
// enumerating extensions
const expectedMarkup = '<div id="name" role="heading" aria-level="3" \
class="clippable-flex-text">My extension 1</div>';
return nodeResult['html'] === expectedMarkup;
},
};
}
......@@ -95,13 +85,7 @@ AccessibilityTest.define('CrExtensionsA11yTest', {
name: 'NoExtensions',
/** @override */
// TODO(crbug.com/1002627): when bug is addressed, this should be replaced
// with axeOptions: CrExtensionsA11yTest.axeOptions,
axeOptions: Object.assign({}, CrExtensionsA11yTest.axeOptions, {
'rules': Object.assign({}, CrExtensionsA11yTest.axeOptions.rules, {
'link-in-text-block': {enabled: false},
})
}),
axeOptions: CrExtensionsA11yTest.axeOptions,
/** @override */
violationFilter: CrExtensionsA11yTest.violationFilter,
......
......@@ -31,8 +31,6 @@ var CrManagementA11yTest = class extends PolymerTest {
'skip-link': {enabled: false},
// TODO(crbug.com/761461): enable after addressing flaky tests.
'color-contrast': {enabled: false},
// TODO(crbug.com/1002623): remove this line after addressing bug
'link-in-text-block': {enabled: false},
},
};
}
......
......@@ -15,7 +15,7 @@ AccessibilityTest.define('CrostiniAccessibilityTest', {
/** @override */
name: 'CROSTINI',
/** @override */
axeOptions: SettingsAccessibilityTest.axeOptionsExcludeLinkInTextBlock,
axeOptions: SettingsAccessibilityTest.axeOptions,
/** @override */
setup: function() {
settings.router.navigateTo(settings.routes.CROSTINI);
......
......@@ -32,7 +32,7 @@ AccessibilityTest.define('MultideviceA11yTest', {
/** @override */
name: 'MULTIDEVICE',
/** @override */
axeOptions: SettingsAccessibilityTest.axeOptionsExcludeLinkInTextBlock,
axeOptions: SettingsAccessibilityTest.axeOptions,
/** @override */
setup: function() {
settings.router.navigateTo(settings.routes.MULTIDEVICE);
......
......@@ -32,7 +32,7 @@ AccessibilityTest.define('MultideviceFeaturesA11yTest', {
/** @override */
name: 'MULTIDEVICE_FEATURES_ACCESSIBILITY',
/** @override */
axeOptions: SettingsAccessibilityTest.axeOptionsExcludeLinkInTextBlock,
axeOptions: SettingsAccessibilityTest.axeOptions,
/** @override */
setup: function() {
settings.router.navigateTo(settings.routes.MULTIDEVICE_FEATURES);
......
......@@ -28,17 +28,6 @@ SettingsAccessibilityTest.axeOptions = {
}
};
// TODO(crbug.com/1002627): This block prevents generation of a
// link-in-text-block browser-test. This can be removed once the bug is
// addressed, and usage should be replaced with
// SettingsAccessibilityTest.axeOptions
SettingsAccessibilityTest.axeOptionsExcludeLinkInTextBlock =
Object.assign({}, SettingsAccessibilityTest.axeOptions, {
'rules': Object.assign({}, SettingsAccessibilityTest.axeOptions.rules, {
'link-in-text-block': {enabled: false},
})
});
// Default accessibility audit options. Specify in test definition to use.
SettingsAccessibilityTest.violationFilter = {
// Polymer components use aria-active-attribute.
......
Name: AXE-CORE Accessibility Audit
Short Name: axe-core
URL: https://github.com/dequelabs/axe-core/
Version: 3.3.2
Date: Thur Aug 22 12:45:00 2019
Revision: 281653df3794f429b71327fe3afa37ca0fadb1c7
Version: 0
Date: Mon Jul 24 12:17:05 2017
Revision: d02dba3223fefe525438330e40b5da5de81eeeb5
License: MPL 2.0
License File: LICENSE
Security Critical: no
......
// Type definitions for axe-core
// Type definitions for axe-core 2.3.1
// Project: https://github.com/dequelabs/axe-core
// Definitions by: Marcy Sutton <https://github.com/marcysutton>
declare namespace axe {
type ImpactValue = 'minor' | 'moderate' | 'serious' | 'critical';
declare module axe {
type TagValue = 'wcag2a' | 'wcag2aa' | 'section508' | 'best-practice';
type ImpactValue = "minor" | "moderate" | "serious" | "critical";
type ReporterVersion = 'v1' | 'v2' | 'raw' | 'raw-env' | 'no-passes';
type TagValue = "wcag2a" | "wcag2aa" | "section508" | "best-practice";
type RunOnlyType = 'rule' | 'rules' | 'tag' | 'tags';
type ReporterVersion = "v1" | "v2";
type resultGroups = 'inapplicable' | 'passes' | 'incomplete' | 'violations';
type RunOnlyType = "rule" | "rules" | "tag" | "tags";
type RunOnlyObject = {
include?: string[] | string[][];
exclude?: string[] | string[][];
};
type RunCallback = (error: Error, results: AxeResults) => void;
type ElementContext = Node | string | RunOnlyObject;
interface TestEngine {
name: string;
version: string;
}
interface TestRunner {
name: string;
}
interface TestEnvironment {
userAgent: string;
windowWidth: number;
windowHeight: number;
orientationAngle?: number;
orientationType?: string;
interface ElementContext {
node?: Object,
selector?: string,
include?: any[],
exclude?: any[]
}
interface RunOnly {
type: RunOnlyType;
values?: TagValue[] | string[] | RunOnlyObject;
}
interface RunOptions {
runOnly?: RunOnly;
rules?: Object;
iframes?: boolean;
elementRef?: boolean;
selectors?: boolean;
resultTypes?: resultGroups[];
reporter?: ReporterVersion;
xpath?: boolean;
absolutePaths?: boolean;
restoreScroll?: boolean;
frameWaitTime?: number;
preload?: boolean;
performanceTimer?: boolean;
type: RunOnlyType,
value?: {
include?: string[],
exclude?: string[]
}
values?: TagValue[]
}
interface AxeResults {
toolOptions: RunOptions;
testEngine: TestEngine;
testRunner: TestRunner;
testEnvironment: TestEnvironment;
url: string;
timestamp: string;
passes: Result[];
violations: Result[];
incomplete: Result[];
inapplicable: Result[];
url: string,
timestamp: string,
passes: Result[],
violations: Result[],
incomplete: Result[],
inapplicable: Result[]
}
interface Result {
description: string;
help: string;
helpUrl: string;
id: string;
impact?: ImpactValue;
tags: TagValue[];
nodes: NodeResult[];
description: string,
help: string,
helpUrl: string,
id: string,
impact: ImpactValue,
tags: TagValue[],
nodes: NodeResult[]
}
interface NodeResult {
html: string;
impact?: ImpactValue;
target: string[];
xpath?: string[];
any: CheckResult[];
all: CheckResult[];
none: CheckResult[];
failureSummary?: string;
html: string,
impact: ImpactValue,
target: string[],
any: CheckResult[],
all: CheckResult[],
none: CheckResult[],
failureSummary?: string
}
interface CheckResult {
id: string;
impact: string;
message: string;
data: any;
relatedNodes?: RelatedNode[];
id: string,
impact: string,
message: string,
data: any,
relatedNodes?: RelatedNode[]
}
interface RelatedNode {
target: string[];
html: string;
}
interface RuleLocale {
[key: string]: {
description: string;
help: string;
};
}
interface CheckLocale {
[key: string]: {
pass: string;
fail: string;
incomplete: string | { [key: string]: string };
};
}
interface Locale {
lang?: string;
rules?: RuleLocale;
checks?: CheckLocale;
target: string[],
html: string
}
interface Spec {
branding?: {
brand?: string;
application?: string;
};
reporter?: ReporterVersion;
checks?: Check[];
rules?: Rule[];
locale?: Locale;
brand: string,
application: string
},
reporter?: ReporterVersion,
checks?: Check[],
rules?: Rule[]
}
interface Check {
id: string;
evaluate: Function | string;
after?: Function | string;
options?: any;
matches?: string;
enabled?: boolean;
id: string,
evaluate: Function,
after?: Function,
options?: any,
matches?: string,
enabled?: boolean
}
interface Rule {
id: string;
selector?: string;
excludeHidden?: boolean;
enabled?: boolean;
pageLevel?: boolean;
any?: string[];
all?: string[];
none?: string[];
tags?: string[];
matches?: string;
id: string,
selector?: string,
excludeHidden?: boolean,
enabled?: boolean,
pageLevel?: boolean,
any?: string[],
all?: string[],
none?: string[],
tags?: string[],
matches?: string
}
interface AxePlugin {
id: string;
run(...args: any[]): any;
id: string,
run(...args:any[]): any,
commands: {
id: string;
callback(...args: any[]): void;
}[];
cleanup?(callback: Function): void;
id: string,
callback(...args:any[]): void
}[],
cleanup?(callback:Function): void
}
let plugins: any;
let plugins: any
/**
* Source string to use as an injected script in Selenium
*/
let source: string;
let source: string
/**
* Object for axe Results
* Object for aXe Results
*/
var AxeResults: AxeResults;
var AxeResults: AxeResults
/**
* Runs a number of rules against the provided HTML page and returns the resulting issue list
*
* @param {ElementContext} context Optional The `Context` specification object @see Context
* @param {RunOptions} options Optional Options passed into rules or checks, temporarily modifying them.
* @param {RunCallback} callback Optional The function to invoke when analysis is complete.
* @returns {Promise<AxeResults>|void} If the callback was not defined, axe will return a Promise.
* @param {Object} context Optional The `Context` specification object @see Context
* @param {Array} options Optional Options passed into rules or checks, temporarily modifying them.
* @param {Function} callback Optional The function to invoke when analysis is complete.
* @returns {any} results If the callback was not defined, aXe will return a Promise instead.
*/
function run(context?: ElementContext): Promise<AxeResults>;
function run(options: RunOptions): Promise<AxeResults>;
function run(callback: (error: Error, results: AxeResults) => void): void;
function run(context: ElementContext, callback: RunCallback): void;
function run(options: RunOptions, callback: RunCallback): void;
function run(
context: ElementContext,
options: RunOptions
): Promise<AxeResults>;
function run(
context: ElementContext,
options: RunOptions,
callback: RunCallback
): void;
function run(context?: ElementContext, options?: {runOnly?: RunOnly, rules?: Object, iframes?: Boolean, elementRef?: Boolean, selectors?: Boolean}, callback?: (error: Error, results:AxeResults) => void): any
/**
* Method for configuring the data format used by axe. Helpful for adding new
* Starts analysis on the current document and its subframes
*
* @param {Object} context The `Context` specification object @see Context
* @param {Array} options Options passed into rules or checks, temporarily modifyint them.
* @param {Function} callback The function to invoke when analysis is complete.
* @returns {Object} results The aXe results object
*/
function a11yCheck(context: ElementContext, options: {runOnly?: RunOnly, rules?: Object, iframes?: Boolean, elementRef?: Boolean, selectors?: Boolean}, callback: (results:AxeResults) => void): AxeResults
/**
* Method for configuring the data format used by aXe. Helpful for adding new
* rules, which must be registered with the library to execute.
* @param {Spec} Spec Object with valid `branding`, `reporter`, `checks` and `rules` data
*/
function configure(spec: Spec): void;
function configure(spec: Spec): void
/**
* Searches and returns rules that contain a tag in the list of tags.
* @param {Array} tags Optional array of tags
* @return {Array} Array of rules
*/
function getRules(tags?: string[]): Object[];
function getRules(tags?: string[]): Object[]
/**
* Restores the default axe configuration
*/
function reset(): void;
function reset(): void
/**
* Function to register a plugin configuration in document and its subframes
* @param {Object} plugin A plugin configuration object
*/
function registerPlugin(plugin: AxePlugin): void;
function registerPlugin(plugin: AxePlugin): void
/**
* Function to clean up plugin configuration in document and its subframes
*/
function cleanup(): void;
function cleanup(): void
}
export = axe;
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment