Commit fc9a09ac authored by Alan Cutter's avatar Alan Cutter Committed by Commit Bot

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

This reverts commit de35a097.

Reason for revert:
Failing on all platforms.
https://test-results.appspot.com/dashboards/flakiness_dashboard.html#tests=WelcomeA11y.WelcomeFlow_color_contrast
https://ci.chromium.org/p/chromium/builders/ci/Mac10.12%20Tests/27248
[18374:18374:0923/204432.097393:ERROR:CONSOLE(49)] "Mocha test failed: WelcomeFlow_color_contrast Landing Page
Error: the string "Found 1 accessibility violations." was thrown, throw an Error :)
", source: file:///b/s/w/ir/chrome/test/data/webui/mocha_adapter.js (49)
[18374:18374:0923/204432.101101:ERROR:web_ui_test_handler.cc(72)] Test Errors: 1/1 tests had failed assertions.
[18374:18374:0923/204432.101355:ERROR:web_ui_browser_test.cc(546)] CONDITION FAILURE: encountered javascript console error(s):
[18374:18374:0923/204432.101376:ERROR:web_ui_browser_test.cc(548)] JS ERROR: '[18374:18374:0923/204432.097393:ERROR:CONSOLE(49)] "Mocha test failed: WelcomeFlow_color_contrast Landing Page
Error: the string "Found 1 accessibility violations." was thrown, throw an Error :)
", source: file:///b/s/w/ir/chrome/test/data/webui/mocha_adapter.js (49)
'
[18374:18374:0923/204432.101390:ERROR:web_ui_browser_test.cc(550)] JS call assumed failed, because JS console error(s) found.
gen/chrome/test/data/webui/welcome/a11y_tests-gen.cc:285: Failure
Value of: RunJavascriptTestF( true, "WelcomeA11y", "WelcomeFlow_color_contrast")
  Actual: false
Expected: true
Stack trace:
#0 0x55ebe3920b5f StackTraceGetter::CurrentStackTrace()
#1 0x55ebe392955c testing::internal::UnitTestImpl::CurrentOsStackTraceExceptTop()
#2 0x55ebe3928ea9 testing::internal::AssertHelper::operator=()
#3 0x55ebe36c24dd WelcomeA11y_WelcomeFlow_color_contrast_Test::RunTestOnMainThread()
#4 0x55ebe60b131e content::BrowserTestBase::ProxyRunTestOnMainThreadLoop()
#5 0x55ebe5cae39c ChromeBrowserMainParts::PreMainMessageLoopRunImpl()
#6 0x55ebe5cad1ad ChromeBrowserMainParts::PreMainMessageLoopRun()
#7 0x55ebe438318f content::BrowserMainLoop::PreMainMessageLoopRun()
#8 0x55ebe4779607 content::StartupTaskRunner::RunAllTasksNow()
#9 0x55ebe4381e42 content::BrowserMainLoop::CreateStartupTasks()
#10 0x55ebe4384bf2 content::BrowserMainRunnerImpl::Initialize()
#11 0x55ebe438041f content::BrowserMain()
#12 0x55ebe5873245 content::ContentMainRunnerImpl::RunServiceManager()
#13 0x55ebe5872d76 content::ContentMainRunnerImpl::Run()
#14 0x55ebe7a2e8dd service_manager::Main()
#15 0x55ebe4c9c511 content::ContentMain()
#16 0x55ebe60b0dc6 content::BrowserTestBase::SetUp()

Original change's description:
> Reland 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
> 
> 4) Several DevTools a11y tests were failing. This change either
>    updates the baseline or excludes the rule depending upon the
>    test/rule itself.
>      - http/tests/devtools/a11y-axe-core/basic-a11y-test.js
>      - http/tests/devtools/a11y-axe-core/console-a11y-test.js
>      - http/tests/devtools/a11y-axe-core/memory/heap-profiler-a11y-test.js
>      - http/tests/devtools/a11y-axe-core/sources/dom-breakpoints-pane-a11y-test.js
> 
> I spent some time investigating the test failures, and it looks
> like axe-core is highlighting legitimate product issues.
> 
> Change-Id: I0ef08cdace91250936f83705fb3cd0fbb35bed4b
> Bug: 984817
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1809407
> Commit-Queue: Mike Jackson <mjackson@microsoft.com>
> Reviewed-by: Yang Guo <yangguo@chromium.org>
> Reviewed-by: Hector Carmona <hcarmona@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#699166}

TBR=aboxhall@chromium.org,hcarmona@chromium.org,yangguo@chromium.org,mjackson@microsoft.com,tvanderlippe@chromium.org

Change-Id: I6e74d1ddeec80407fc057dd07c95c492d7e6679f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 984817
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1819284Reviewed-by: default avatarAlan Cutter <alancutter@chromium.org>
Commit-Queue: Alan Cutter <alancutter@chromium.org>
Cr-Commit-Position: refs/heads/master@{#699191}
parent 2fd10c02
...@@ -99,8 +99,6 @@ js2gtest("browser_tests_js_webui") { ...@@ -99,8 +99,6 @@ js2gtest("browser_tests_js_webui") {
"webui_resource_async_browsertest.js", "webui_resource_async_browsertest.js",
] ]
gen_include_files = [ "a11y/accessibility_audit_rules.js" ]
extra_js_files = [ extra_js_files = [
"test_browser_proxy.js", "test_browser_proxy.js",
"settings/test_password_manager_proxy.js", "settings/test_password_manager_proxy.js",
......
...@@ -52,6 +52,7 @@ AccessibilityTest.ruleIds = [ ...@@ -52,6 +52,7 @@ AccessibilityTest.ruleIds = [
'frame-title', 'frame-title',
'heading-order', 'heading-order',
'hidden-content', 'hidden-content',
'href-no-hash',
'html-has-lang', 'html-has-lang',
'html-lang-valid', 'html-lang-valid',
'image-alt', 'image-alt',
......
...@@ -56,16 +56,6 @@ var CrExtensionsA11yTest = class extends PolymerTest { ...@@ -56,16 +56,6 @@ var CrExtensionsA11yTest = class extends PolymerTest {
return parentNode && parentNode.host && return parentNode && parentNode.host &&
parentNode.host.tagName == 'CR-TOGGLE'; 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', { ...@@ -95,13 +85,7 @@ AccessibilityTest.define('CrExtensionsA11yTest', {
name: 'NoExtensions', name: 'NoExtensions',
/** @override */ /** @override */
// TODO(crbug.com/1002627): when bug is addressed, this should be replaced axeOptions: CrExtensionsA11yTest.axeOptions,
// with axeOptions: CrExtensionsA11yTest.axeOptions,
axeOptions: Object.assign({}, CrExtensionsA11yTest.axeOptions, {
'rules': Object.assign({}, CrExtensionsA11yTest.axeOptions.rules, {
'link-in-text-block': {enabled: false},
})
}),
/** @override */ /** @override */
violationFilter: CrExtensionsA11yTest.violationFilter, violationFilter: CrExtensionsA11yTest.violationFilter,
......
...@@ -31,8 +31,6 @@ var CrManagementA11yTest = class extends PolymerTest { ...@@ -31,8 +31,6 @@ var CrManagementA11yTest = class extends PolymerTest {
'skip-link': {enabled: false}, 'skip-link': {enabled: false},
// TODO(crbug.com/761461): enable after addressing flaky tests. // TODO(crbug.com/761461): enable after addressing flaky tests.
'color-contrast': {enabled: false}, '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', { ...@@ -15,7 +15,7 @@ AccessibilityTest.define('CrostiniAccessibilityTest', {
/** @override */ /** @override */
name: 'CROSTINI', name: 'CROSTINI',
/** @override */ /** @override */
axeOptions: SettingsAccessibilityTest.axeOptionsExcludeLinkInTextBlock, axeOptions: SettingsAccessibilityTest.axeOptions,
/** @override */ /** @override */
setup: function() { setup: function() {
settings.router.navigateTo(settings.routes.CROSTINI); settings.router.navigateTo(settings.routes.CROSTINI);
......
...@@ -32,7 +32,7 @@ AccessibilityTest.define('MultideviceA11yTest', { ...@@ -32,7 +32,7 @@ AccessibilityTest.define('MultideviceA11yTest', {
/** @override */ /** @override */
name: 'MULTIDEVICE', name: 'MULTIDEVICE',
/** @override */ /** @override */
axeOptions: SettingsAccessibilityTest.axeOptionsExcludeLinkInTextBlock, axeOptions: SettingsAccessibilityTest.axeOptions,
/** @override */ /** @override */
setup: function() { setup: function() {
settings.router.navigateTo(settings.routes.MULTIDEVICE); settings.router.navigateTo(settings.routes.MULTIDEVICE);
......
...@@ -32,7 +32,7 @@ AccessibilityTest.define('MultideviceFeaturesA11yTest', { ...@@ -32,7 +32,7 @@ AccessibilityTest.define('MultideviceFeaturesA11yTest', {
/** @override */ /** @override */
name: 'MULTIDEVICE_FEATURES_ACCESSIBILITY', name: 'MULTIDEVICE_FEATURES_ACCESSIBILITY',
/** @override */ /** @override */
axeOptions: SettingsAccessibilityTest.axeOptionsExcludeLinkInTextBlock, axeOptions: SettingsAccessibilityTest.axeOptions,
/** @override */ /** @override */
setup: function() { setup: function() {
settings.router.navigateTo(settings.routes.MULTIDEVICE_FEATURES); settings.router.navigateTo(settings.routes.MULTIDEVICE_FEATURES);
......
...@@ -28,17 +28,6 @@ SettingsAccessibilityTest.axeOptions = { ...@@ -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. // Default accessibility audit options. Specify in test definition to use.
SettingsAccessibilityTest.violationFilter = { SettingsAccessibilityTest.violationFilter = {
// Polymer components use aria-active-attribute. // Polymer components use aria-active-attribute.
......
Name: AXE-CORE Accessibility Audit Name: AXE-CORE Accessibility Audit
Short Name: axe-core Short Name: axe-core
URL: https://github.com/dequelabs/axe-core/ URL: https://github.com/dequelabs/axe-core/
Version: 3.3.2 Version: 0
Date: Thur Aug 22 12:45:00 2019 Date: Mon Jul 24 12:17:05 2017
Revision: 281653df3794f429b71327fe3afa37ca0fadb1c7 Revision: d02dba3223fefe525438330e40b5da5de81eeeb5
License: MPL 2.0 License: MPL 2.0
License File: LICENSE License File: LICENSE
Security Critical: no Security Critical: no
......
// Type definitions for axe-core // Type definitions for axe-core 2.3.1
// Project: https://github.com/dequelabs/axe-core // Project: https://github.com/dequelabs/axe-core
// Definitions by: Marcy Sutton <https://github.com/marcysutton> // Definitions by: Marcy Sutton <https://github.com/marcysutton>
declare namespace axe { declare module axe {
type ImpactValue = 'minor' | 'moderate' | 'serious' | 'critical';
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 = { interface ElementContext {
include?: string[] | string[][]; node?: Object,
exclude?: string[] | string[][]; selector?: string,
}; include?: any[],
exclude?: any[]
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 RunOnly { interface RunOnly {
type: RunOnlyType; type: RunOnlyType,
values?: TagValue[] | string[] | RunOnlyObject; value?: {
} include?: string[],
interface RunOptions { exclude?: string[]
runOnly?: RunOnly; }
rules?: Object; values?: TagValue[]
iframes?: boolean;
elementRef?: boolean;
selectors?: boolean;
resultTypes?: resultGroups[];
reporter?: ReporterVersion;
xpath?: boolean;
absolutePaths?: boolean;
restoreScroll?: boolean;
frameWaitTime?: number;
preload?: boolean;
performanceTimer?: boolean;
} }
interface AxeResults { interface AxeResults {
toolOptions: RunOptions; url: string,
testEngine: TestEngine; timestamp: string,
testRunner: TestRunner; passes: Result[],
testEnvironment: TestEnvironment; violations: Result[],
url: string; incomplete: Result[],
timestamp: string; inapplicable: Result[]
passes: Result[];
violations: Result[];
incomplete: Result[];
inapplicable: Result[];
} }
interface Result { interface Result {
description: string; description: string,
help: string; help: string,
helpUrl: string; helpUrl: string,
id: string; id: string,
impact?: ImpactValue; impact: ImpactValue,
tags: TagValue[]; tags: TagValue[],
nodes: NodeResult[]; nodes: NodeResult[]
} }
interface NodeResult { interface NodeResult {
html: string; html: string,
impact?: ImpactValue; impact: ImpactValue,
target: string[]; target: string[],
xpath?: string[]; any: CheckResult[],
any: CheckResult[]; all: CheckResult[],
all: CheckResult[]; none: CheckResult[],
none: CheckResult[]; failureSummary?: string
failureSummary?: string;
} }
interface CheckResult { interface CheckResult {
id: string; id: string,
impact: string; impact: string,
message: string; message: string,
data: any; data: any,
relatedNodes?: RelatedNode[]; relatedNodes?: RelatedNode[]
} }
interface RelatedNode { interface RelatedNode {
target: string[]; target: string[],
html: 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;
} }
interface Spec { interface Spec {
branding?: { branding?: {
brand?: string; brand: string,
application?: string; application: string
}; },
reporter?: ReporterVersion; reporter?: ReporterVersion,
checks?: Check[]; checks?: Check[],
rules?: Rule[]; rules?: Rule[]
locale?: Locale;
} }
interface Check { interface Check {
id: string; id: string,
evaluate: Function | string; evaluate: Function,
after?: Function | string; after?: Function,
options?: any; options?: any,
matches?: string; matches?: string,
enabled?: boolean; enabled?: boolean
} }
interface Rule { interface Rule {
id: string; id: string,
selector?: string; selector?: string,
excludeHidden?: boolean; excludeHidden?: boolean,
enabled?: boolean; enabled?: boolean,
pageLevel?: boolean; pageLevel?: boolean,
any?: string[]; any?: string[],
all?: string[]; all?: string[],
none?: string[]; none?: string[],
tags?: string[]; tags?: string[],
matches?: string; matches?: string
} }
interface AxePlugin { interface AxePlugin {
id: string; id: string,
run(...args: any[]): any; run(...args:any[]): any,
commands: { commands: {
id: string; id: string,
callback(...args: any[]): void; callback(...args:any[]): void
}[]; }[],
cleanup?(callback: Function): void; cleanup?(callback:Function): void
} }
let plugins: any; let plugins: any
/** /**
* Source string to use as an injected script in Selenium * 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 * 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 {Object} context Optional The `Context` specification object @see Context
* @param {RunOptions} options Optional Options passed into rules or checks, temporarily modifying them. * @param {Array} options Optional Options passed into rules or checks, temporarily modifying them.
* @param {RunCallback} callback Optional The function to invoke when analysis is complete. * @param {Function} 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. * @returns {any} results If the callback was not defined, aXe will return a Promise instead.
*/ */
function run(context?: ElementContext): Promise<AxeResults>; function run(context?: ElementContext, options?: {runOnly?: RunOnly, rules?: Object, iframes?: Boolean, elementRef?: Boolean, selectors?: Boolean}, callback?: (error: Error, results:AxeResults) => void): any
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;
/** /**
* 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. * rules, which must be registered with the library to execute.
* @param {Spec} Spec Object with valid `branding`, `reporter`, `checks` and `rules` data * @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. * Searches and returns rules that contain a tag in the list of tags.
* @param {Array} tags Optional array of tags * @param {Array} tags Optional array of tags
* @return {Array} Array of rules * @return {Array} Array of rules
*/ */
function getRules(tags?: string[]): Object[]; function getRules(tags?: string[]): Object[]
/** /**
* Restores the default axe configuration * Restores the default axe configuration
*/ */
function reset(): void; function reset(): void
/** /**
* Function to register a plugin configuration in document and its subframes * Function to register a plugin configuration in document and its subframes
* @param {Object} plugin A plugin configuration object * @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 to clean up plugin configuration in document and its subframes
*/ */
function cleanup(): void; function cleanup(): void
} }
export = axe; export = axe;
This diff is collapsed.
This diff is collapsed.
...@@ -14,12 +14,6 @@ ...@@ -14,12 +14,6 @@
'sensors', 'sensors',
]; ];
//TODO(crbug.com/1004940): exclude scrollable-region-focusable for performance.monitor only
const NO_SCROLLABLE_REGION_FOCUSABLE_RULESET = {
'scrollable-region-focusable': {
enabled: false,
},
};
for (const location of locationsToTest) for (const location of locationsToTest)
await loadViewAndTestElementViolations(location); await loadViewAndTestElementViolations(location);
...@@ -30,7 +24,6 @@ ...@@ -30,7 +24,6 @@
TestRunner.addResult(`Tests accessibility in the ${view} view using the axe-core linter.`); TestRunner.addResult(`Tests accessibility in the ${view} view using the axe-core linter.`);
await UI.viewManager.showView(view); await UI.viewManager.showView(view);
const widget = await UI.viewManager.view(view).widget(); const widget = await UI.viewManager.view(view).widget();
const ruleset = view === 'performance.monitor' ? NO_SCROLLABLE_REGION_FOCUSABLE_RULESET : {}; await AxeCoreTestRunner.runValidation(widget.element);
await AxeCoreTestRunner.runValidation(widget.element, ruleset);
} }
})(); })();
Tests accessibility in the console using the axe-core linter. Tests accessibility in the console using the axe-core linter.
aXe violations: [ aXe violations: []
{
"ruleDescription": "Ensures every ARIA input field has an accessible name",
"helpUrl": "https://dequeuniversity.com/rules/axe/3.3/aria-input-field-name?application=axeAPI",
"ruleId": "aria-input-field-name",
"impact": "serious",
"failedNodes": [
{
"target": [
[
".console-main-toolbar",
".toolbar-input-prompt"
]
],
"html": "<div class=\"toolbar-input-prompt text-prompt\" role=\"textbox\" contenteditable=\"plaintext-only\" data-placeholder=\"Filter\" aria-placeholder=\"Filter\"></div>",
"failureSummary": "Fix any of the following:\n aria-label attribute does not exist or is empty\n aria-labelledby attribute does not exist, references elements that do not exist or references elements that are empty\n Element has no title attribute or the title attribute is empty"
}
]
}
]
...@@ -10,7 +10,6 @@ ...@@ -10,7 +10,6 @@
await UI.viewManager.showView('console'); await UI.viewManager.showView('console');
const widget = await UI.viewManager.view('console').widget(); const widget = await UI.viewManager.view('console').widget();
//TODO(crbug.com/1004940): expected.txt file has 'aria-input-field-name' exceptions
await AxeCoreTestRunner.runValidation(widget.element); await AxeCoreTestRunner.runValidation(widget.element);
TestRunner.completeTest(); TestRunner.completeTest();
})(); })();
Tests accessibility in heap profiler using the axe-core linter. Tests accessibility in heap profiler using the axe-core linter.
aXe violations: [ aXe violations: []
{
"ruleDescription": "Ensures role attribute has an appropriate value for the element",
"helpUrl": "https://dequeuniversity.com/rules/axe/3.3/aria-allowed-role?application=axeAPI",
"ruleId": "aria-allowed-role",
"impact": "minor",
"failedNodes": [
{
"target": [
"form"
],
"html": "<form role=\"radiogroup\" aria-label=\"Select profiling type\">",
"failureSummary": "Fix any of the following:\n ARIA role radiogroup is not allowed for given element"
}
]
}
]
...@@ -37,7 +37,6 @@ ...@@ -37,7 +37,6 @@
await UI.viewManager.showView('heap_profiler'); await UI.viewManager.showView('heap_profiler');
const widget = await UI.viewManager.view('heap_profiler').widget(); const widget = await UI.viewManager.view('heap_profiler').widget();
//TODO(crbug.com/1004940): expected.txt file has 'aria-allowed-role' exceptions
await AxeCoreTestRunner.runValidation(widget.element); await AxeCoreTestRunner.runValidation(widget.element);
TestRunner.completeTest(); TestRunner.completeTest();
})(); })();
...@@ -6,31 +6,31 @@ Running the axe-core linter on the DOM breakpoints pane. ...@@ -6,31 +6,31 @@ Running the axe-core linter on the DOM breakpoints pane.
aXe violations: [ aXe violations: [
{ {
"ruleDescription": "Ensures every form element has a label", "ruleDescription": "Ensures every form element has a label",
"helpUrl": "https://dequeuniversity.com/rules/axe/3.3/label?application=axeAPI", "helpUrl": "https://dequeuniversity.com/rules/axe/3.0/label?application=axeAPI",
"ruleId": "label", "ruleId": "label",
"impact": "critical", "impact": "critical",
"failedNodes": [ "failedNodes": [
{ {
"target": [ "target": [
[ [
".flex-none.flex-auto.vbox:nth-child(7) > .flex-auto.vbox", "div:nth-child(7) > div.vbox.flex-auto",
".breakpoint-entry:nth-child(1) > span[is=\"dt-checkbox\"]", ".widget.vbox > .breakpoint-list > div:nth-child(1) > span",
"#ui-checkbox-label9" "#ui-checkbox-label9"
] ]
], ],
"html": "<input type=\"checkbox\" id=\"ui-checkbox-label9\">", "html": "<input type=\"checkbox\" id=\"ui-checkbox-label9\" aria-label=\"Subtree modified: div#rootElement\">",
"failureSummary": "Fix any of the following:\n aria-label attribute does not exist or is empty\n aria-labelledby attribute does not exist, references elements that do not exist or references elements that are empty\n Form element does not have an implicit (wrapped) <label>\n Form element does not have an explicit <label>\n Element has no title attribute or the title attribute is empty" "failureSummary": "Fix any of the following:\n aria-label attribute does not exist or is empty\n aria-labelledby attribute does not exist, references elements that do not exist or references elements that are empty or not visible\n Form element does not have an implicit (wrapped) <label>\n Form element does not have an explicit <label>\n Element has no title attribute or the title attribute is empty"
}, },
{ {
"target": [ "target": [
[ [
".flex-none.flex-auto.vbox:nth-child(7) > .flex-auto.vbox", "div:nth-child(7) > div.vbox.flex-auto",
".breakpoint-entry:nth-child(2) > span[is=\"dt-checkbox\"]", ".widget.vbox > .breakpoint-list > div:nth-child(2) > span",
"#ui-checkbox-label10" "#ui-checkbox-label10"
] ]
], ],
"html": "<input type=\"checkbox\" id=\"ui-checkbox-label10\">", "html": "<input type=\"checkbox\" id=\"ui-checkbox-label10\" aria-label=\"Node removed: div#hostElement\">",
"failureSummary": "Fix any of the following:\n aria-label attribute does not exist or is empty\n aria-labelledby attribute does not exist, references elements that do not exist or references elements that are empty\n Form element does not have an implicit (wrapped) <label>\n Form element does not have an explicit <label>\n Element has no title attribute or the title attribute is empty" "failureSummary": "Fix any of the following:\n aria-label attribute does not exist or is empty\n aria-labelledby attribute does not exist, references elements that do not exist or references elements that are empty or not visible\n Form element does not have an implicit (wrapped) <label>\n Form element does not have an explicit <label>\n Element has no title attribute or the title attribute is empty"
} }
] ]
} }
......
...@@ -36,7 +36,6 @@ ...@@ -36,7 +36,6 @@
TestRunner.addResult( TestRunner.addResult(
'Running the axe-core linter on the DOM breakpoints pane.'); 'Running the axe-core linter on the DOM breakpoints pane.');
//TODO(crbug.com/1004940): expected.txt file has 'label' exceptions
await AxeCoreTestRunner.runValidation(domBreakpointContainer.element); await AxeCoreTestRunner.runValidation(domBreakpointContainer.element);
TestRunner.completeTest(); TestRunner.completeTest();
})(); })();
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