WebKit Bugzilla
Attachment 373304 Details for
Bug 198719
: Web Inspector: Audit: missing demo audits for WebInspectorAudit functions
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-198719.patch (text/plain), 35.14 KB, created by
Devin Rousso
on 2019-07-01 23:26:50 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Devin Rousso
Created:
2019-07-01 23:26:50 PDT
Size:
35.14 KB
patch
obsolete
>diff --git a/Source/WebInspectorUI/ChangeLog b/Source/WebInspectorUI/ChangeLog >index c17f70b67d2d8cc7c88d126214e072939a9faf0b..c8def67c675fd068236fd8cf69dbdb0ec2c9b86f 100644 >--- a/Source/WebInspectorUI/ChangeLog >+++ b/Source/WebInspectorUI/ChangeLog >@@ -1,3 +1,22 @@ >+2019-06-10 Devin Rousso <drousso@apple.com> >+ >+ Web Inspector: Audit: missing demo audits for WebInspectorAudit functions >+ https://bugs.webkit.org/show_bug.cgi?id=198719 >+ >+ Reviewed by Matt Baker. >+ >+ Other than the LayoutTests, there's no way to see an example of the functionality of many of >+ the exposed `WebInspectorAudit` functions. There should be a demo audit for every exposed >+ function so they're more discoverable. >+ >+ * UserInterface/Controllers/AuditManager.js: >+ (WI.AuditManager.prototype._addDefaultTests): >+ (WI.AuditManager.prototype._addDefaultTests.removeWhitespace): Added. >+ Move all demo audit test functions to be actual JavaScript functions, which are then >+ stringified and stripped of unnecessary white-space. >+ >+ * Localizations/en.lproj/localizedStrings.js: >+ > 2019-06-07 Nikita Vasilyev <nvasilyev@apple.com> > > Web Inspector: longhand CSS properties overridden by shorthands miss strikethrough >diff --git a/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js b/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js >index 9a3c9ea4c4a35e98c0aa6440aee3fc91aae16296..e0a1d33ad52501ad88a7e2bcdbef203a914b2cd8 100644 >--- a/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js >+++ b/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js >@@ -299,6 +299,7 @@ localizedStrings["Current"] = "Current"; > localizedStrings["Current State"] = "Current State"; > localizedStrings["Custom"] = "Custom"; > localizedStrings["DNS"] = "DNS"; >+localizedStrings["DOM"] = "DOM"; > localizedStrings["DOM Content Loaded \u2014 %s"] = "DOM Content Loaded \u2014 %s"; > localizedStrings["DOM Event"] = "DOM Event"; > localizedStrings["DOM Events"] = "DOM Events"; >@@ -1011,6 +1012,7 @@ localizedStrings["Sources"] = "Sources"; > localizedStrings["Sources:"] = "Sources:"; > localizedStrings["Space"] = "Space"; > localizedStrings["Spaces"] = "Spaces"; >+localizedStrings["Specially Exposed Data"] = "Specially Exposed Data"; > localizedStrings["Specificity: (%d, %d, %d)"] = "Specificity: (%d, %d, %d)"; > localizedStrings["Specificity: No value for selected element"] = "Specificity: No value for selected element"; > localizedStrings["Spelling"] = "Spelling"; >@@ -1077,6 +1079,10 @@ localizedStrings["The resource was requested insecurely."] = "The resource was r > localizedStrings["There is an incurred energy penalty each time the page enters script. This commonly happens with timers, event handlers, and observers."] = "There is an incurred energy penalty each time the page enters script. This commonly happens with timers, event handlers, and observers."; > localizedStrings["These are all of the different test result levels."] = "These are all of the different test result levels."; > localizedStrings["These are all of the different types of data that can be returned with the test result."] = "These are all of the different types of data that can be returned with the test result."; >+localizedStrings["These tests demonstrate how to use %s to access information not normally available to JavaScript."] = "These tests demonstrate how to use %s to access information not normally available to JavaScript."; >+localizedStrings["These tests demonstrate how to use %s to get information about DOM nodes."] = "These tests demonstrate how to use %s to get information about DOM nodes."; >+localizedStrings["These tests demonstrate how to use %s to get information about loaded resources."] = "These tests demonstrate how to use %s to get information about loaded resources."; >+localizedStrings["These tests demonstrate how to use %s to get information about the accessibility tree."] = "These tests demonstrate how to use %s to get information about the accessibility tree."; > localizedStrings["These tests serve as a demonstration of the functionality and structure of audits."] = "These tests serve as a demonstration of the functionality and structure of audits."; > localizedStrings["This action causes no visual change"] = "This action causes no visual change"; > localizedStrings["This action moves the path outside the visible area"] = "This action moves the path outside the visible area"; >@@ -1092,6 +1098,20 @@ localizedStrings["This is what the result of a warning test with no data looks l > localizedStrings["This is what the result of an unsupported test with no data looks like."] = "This is what the result of an unsupported test with no data looks like."; > localizedStrings["This object is a root"] = "This object is a root"; > localizedStrings["This object is referenced by internal objects"] = "This object is referenced by internal objects"; >+localizedStrings["This test will pass with a variety of accessibility information about the <body> element."] = "This test will pass with a variety of accessibility information about the <body> element."; >+localizedStrings["This test will pass with all DOM nodes that have a computed role of \u0022link\u0022."] = "This test will pass with all DOM nodes that have a computed role of \u0022link\u0022."; >+localizedStrings["This test will pass with all child nodes that are selected (\u0022%s\u0022) of the <body> element in the accessibility tree."] = "This test will pass with all child nodes that are selected (\u0022%s\u0022) of the <body> element in the accessibility tree."; >+localizedStrings["This test will pass with all nodes controlled (\u0022%s\u0022) by the <body> element, if any exist."] = "This test will pass with all nodes controlled (\u0022%s\u0022) by the <body> element, if any exist."; >+localizedStrings["This test will pass with all nodes flowed to (\u0022%s\u0022) from the <body> element, if any exist."] = "This test will pass with all nodes flowed to (\u0022%s\u0022) from the <body> element, if any exist."; >+localizedStrings["This test will pass with all nodes owned (\u0022%s\u0022) by the <body> element, if any exist."] = "This test will pass with all nodes owned (\u0022%s\u0022) by the <body> element, if any exist."; >+localizedStrings["This test will pass with all of the child nodes of the <body> element in the accessibility tree."] = "This test will pass with all of the child nodes of the <body> element in the accessibility tree."; >+localizedStrings["This test will pass with data indicating whether the <body> element has any click event listeners."] = "This test will pass with data indicating whether the <body> element has any click event listeners."; >+localizedStrings["This test will pass with data indicating whether the <body> element has any event listeners."] = "This test will pass with data indicating whether the <body> element has any event listeners."; >+localizedStrings["This test will pass with somee basic information about each resource."] = "This test will pass with somee basic information about each resource."; >+localizedStrings["This test will pass with the active descendant (\u0022%s\u0022) of the <body> element, if it exists."] = "This test will pass with the active descendant (\u0022%s\u0022) of the <body> element, if it exists."; >+localizedStrings["This test will pass with the contents of the main resource."] = "This test will pass with the contents of the main resource."; >+localizedStrings["This test will pass with the node that would handle mouse events for the <body> element, if applicable."] = "This test will pass with the node that would handle mouse events for the <body> element, if applicable."; >+localizedStrings["This test will pass with the parent node of the <body> element in the accessibility tree."] = "This test will pass with the parent node of the <body> element in the accessibility tree."; > localizedStrings["This text resource could benefit from compression"] = "This text resource could benefit from compression"; > localizedStrings["Threads"] = "Threads"; > localizedStrings["Time"] = "Time"; >diff --git a/Source/WebInspectorUI/UserInterface/Controllers/AuditManager.js b/Source/WebInspectorUI/UserInterface/Controllers/AuditManager.js >index 10467afa558fe7424de37df42b74db4f9f1bf08f..991b915948a1b3f929f32ac80bdfb27c216e91cf 100644 >--- a/Source/WebInspectorUI/UserInterface/Controllers/AuditManager.js >+++ b/Source/WebInspectorUI/UserInterface/Controllers/AuditManager.js >@@ -343,6 +343,121 @@ WI.AuditManager = class AuditManager extends WI.Object > > _addDefaultTests() > { >+ const levelPass = function() { >+ return {level: "pass"}; >+ }; >+ >+ const levelWarn = function() { >+ return {level: "warn"}; >+ }; >+ >+ const levelFail = function() { >+ return {level: "fail"}; >+ }; >+ >+ const levelError = function() { >+ return {level: "error"}; >+ }; >+ >+ const levelUnsupported = function() { >+ return {level: "unsupported"}; >+ }; >+ >+ const dataDOMNodes = function() { >+ return {level: "pass", domNodes: [document.body]}; >+ }; >+ >+ const dataDOMAttributes = function() { >+ return {level: "pass", domNodes: Array.from(document.querySelectorAll("[id]")), domAttributes: ["id"]}; >+ }; >+ >+ const dataErrors = function() { >+ throw Error("this error was thrown from inside the audit test code."); >+ }; >+ >+ const dataCustom = function() { >+ return {level: "pass", a: 1, b: [2], c: {key: 3}}; >+ }; >+ >+ const getElementsByComputedRole = function() { >+ return {level: "pass", domNodes: WebInspectorAudit.Accessibility.getElementsByComputedRole("link"), domAttributes: ["role"]}; >+ }; >+ >+ const getActiveDescendant = function() { >+ let result = {level: "pass"}; >+ let activeDescendant = WebInspectorAudit.Accessibility.getActiveDescendant(document.body); >+ if (activeDescendant) >+ result.domNodes = [activeDescendant]; >+ return result; >+ }; >+ >+ const getChildNodes = function() { >+ let childNodes = WebInspectorAudit.Accessibility.getChildNodes(document.body); >+ return {level: "pass", domNodes: childNodes || []}; >+ }; >+ >+ const getComputedProperties = function() { >+ let domAttributes = ["alt", "aria-atomic", "aria-busy", "aria-checked", "aria-current", "aria-disabled", "aria-expanded", "aria-haspopup", "aria-hidden", "aria-invalid", "aria-label", "aria-labelledby", "aria-level", "aria-live", "aria-pressed", "aria-readonly", "aria-relevant", "aria-required", "aria-selected", "role", "title"].filter((attribute) => document.body.hasAttribute(attribute)); >+ let computedProperties = WebInspectorAudit.Accessibility.getComputedProperties(document.body); >+ return {level: "pass", domNodes: [document.body], domAttributes, ...(computedProperties || {})}; >+ }; >+ >+ const getControlledNodes = function() { >+ let controlledNodes = WebInspectorAudit.Accessibility.getControlledNodes(document.body); >+ return {level: "pass", domNodes: controlledNodes || []}; >+ }; >+ >+ const getFlowedNodes = function() { >+ let flowedNodes = WebInspectorAudit.Accessibility.getFlowedNodes(document.body); >+ return {level: "pass", domNodes: flowedNodes || []}; >+ }; >+ >+ const getMouseEventNode = function() { >+ let result = {level: "pass"}; >+ let mouseEventNode = WebInspectorAudit.Accessibility.getMouseEventNode(document.body); >+ if (mouseEventNode) >+ result.domNodes = [mouseEventNode]; >+ return result; >+ }; >+ >+ const getOwnedNodes = function() { >+ let ownedNodes = WebInspectorAudit.Accessibility.getOwnedNodes(document.body); >+ return {level: "pass", domNodes: ownedNodes || []}; >+ }; >+ >+ const getParentNode = function() { >+ let result = {level: "pass"}; >+ let parentNode = WebInspectorAudit.Accessibility.getParentNode(document.body); >+ if (parentNode) >+ result.domNodes = [parentNode]; >+ return result; >+ }; >+ >+ const getSelectedChildNodes = function() { >+ let selectedChildNodes = WebInspectorAudit.Accessibility.getSelectedChildNodes(document.body); >+ return {level: "pass", domNodes: selectedChildNodes || []}; >+ }; >+ >+ const hasEventListeners = function() { >+ let domAttributes = Array.from(document.body.attributes).filter((attribute) => attribute.name.startsWith("on")); >+ return {level: "pass", domNodes: [document.body], domAttributes, hasEventListeners: WebInspectorAudit.DOM.hasEventListeners(document.body)}; >+ }; >+ >+ const hasEventListenersClick = function() { >+ let domAttributes = ["onclick"].filter((attribute) => document.body.hasAttribute(attribute)); >+ return {level: "pass", domNodes: [document.body], domAttributes, hasClickEventListener: WebInspectorAudit.DOM.hasEventListeners(document.body, "click")}; >+ }; >+ >+ const getResources = function() { >+ return {level: "pass", resources: WebInspectorAudit.Resources.getResources()}; >+ }; >+ >+ const getResourceContent = function() { >+ let resources = WebInspectorAudit.Resources.getResources(); >+ let mainResource = resources.find((resource) => resource.url === window.location.href); >+ return {level: "pass", mainResource, resourceContent: WebInspectorAudit.Resources.getResourceContent(mainResource.id)}; >+ }; >+ > const testMenuRoleForRequiredChidren = function() { > const relationships = { > menu: ["menuitem", "menuitemcheckbox", "menuitemradio"], >@@ -880,45 +995,71 @@ WI.AuditManager = class AuditManager extends WI.Object > return {level: domNodes.length ? "fail" : "pass", domNodes, domAttributes: ["aria-hidden"]}; > }; > >+ function removeWhitespace(func) { >+ return func.toString().replace(/\s+/g, " "); >+ } >+ > const defaultTests = [ > new WI.AuditTestGroup(WI.UIString("Demo Audit"), [ > new WI.AuditTestGroup(WI.UIString("Result Levels"), [ >- new WI.AuditTestCase(`level-pass`, `function() { return {level: "pass"}; }`, {description: WI.UIString("This is what the result of a passing test with no data looks like.")}), >- new WI.AuditTestCase(`level-warn`, `function() { return {level: "warn"}; }`, {description: WI.UIString("This is what the result of a warning test with no data looks like.")}), >- new WI.AuditTestCase(`level-fail`, `function() { return {level: "fail"}; }`, {description: WI.UIString("This is what the result of a failing test with no data looks like.")}), >- new WI.AuditTestCase(`level-error`, `function() { return {level: "error"}; }`, {description: WI.UIString("This is what the result of a test that threw an error with no data looks like.")}), >- new WI.AuditTestCase(`level-unsupported`, `function() { return {level: "unsupported"}; }`, {description: WI.UIString("This is what the result of an unsupported test with no data looks like.")}), >+ new WI.AuditTestCase("level-pass", removeWhitespace(levelPass), {description: WI.UIString("This is what the result of a passing test with no data looks like.")}), >+ new WI.AuditTestCase("level-warn", removeWhitespace(levelWarn), {description: WI.UIString("This is what the result of a warning test with no data looks like.")}), >+ new WI.AuditTestCase("level-fail", removeWhitespace(levelFail), {description: WI.UIString("This is what the result of a failing test with no data looks like.")}), >+ new WI.AuditTestCase("level-error", removeWhitespace(levelError), {description: WI.UIString("This is what the result of a test that threw an error with no data looks like.")}), >+ new WI.AuditTestCase("level-unsupported", removeWhitespace(levelUnsupported), {description: WI.UIString("This is what the result of an unsupported test with no data looks like.")}), > ], {description: WI.UIString("These are all of the different test result levels.")}), > new WI.AuditTestGroup(WI.UIString("Result Data"), [ >- new WI.AuditTestCase(`data-domNodes`, `function() { return {domNodes: [document.body], level: "pass"}; }`, {description: WI.UIString("This is an example of how result DOM nodes are shown. It will pass with the <body> element.")}), >- new WI.AuditTestCase(`data-domAttributes`, `function() { return {domNodes: Array.from(document.querySelectorAll("[id]")), domAttributes: ["id"], level: "pass"}; }`, {description: WI.UIString("This is an example of how result DOM attributes are highlighted on any returned DOM nodes. It will pass with all elements with an id attribute.")}), >- new WI.AuditTestCase(`data-errors`, `function() { throw Error("this error was thrown from inside the audit test code."); }`, {description: WI.UIString("This is an example of how errors are shown. The error was thrown manually, but execution errors will appear in the same way.")}), >- new WI.AuditTestCase(`data-custom`, `function() { return {level: "pass", a: 1, b: [2], c: {key: 3}}; }`, {description: WI.UIString("This is an example of how custom result data is shown.")}), >+ new WI.AuditTestCase("data-domNodes", removeWhitespace(dataDOMNodes), {description: WI.UIString("This is an example of how result DOM nodes are shown. It will pass with the <body> element.")}), >+ new WI.AuditTestCase("data-domAttributes", removeWhitespace(dataDOMAttributes), {description: WI.UIString("This is an example of how result DOM attributes are highlighted on any returned DOM nodes. It will pass with all elements with an id attribute.")}), >+ new WI.AuditTestCase("data-errors", removeWhitespace(dataErrors), {description: WI.UIString("This is an example of how errors are shown. The error was thrown manually, but execution errors will appear in the same way.")}), >+ new WI.AuditTestCase("data-custom", removeWhitespace(dataCustom), {description: WI.UIString("This is an example of how custom result data is shown."), supports: 3}), > ], {description: WI.UIString("These are all of the different types of data that can be returned with the test result.")}), >+ new WI.AuditTestGroup(WI.UIString("Specially Exposed Data"), [ >+ new WI.AuditTestGroup(WI.UIString("Accessibility"), [ >+ new WI.AuditTestCase("getElementsByComputedRole", removeWhitespace(getElementsByComputedRole), {description: WI.UIString("This test will pass with all DOM nodes that have a computed role of \u0022link\u0022."), supports: 1}), >+ new WI.AuditTestCase("getActiveDescendant", removeWhitespace(getActiveDescendant), {description: WI.UIString("This test will pass with the active descendant (\u0022%s\u0022) of the <body> element, if it exists.").format(WI.unlocalizedString("aria-activedescendant")), supports: 1}), >+ new WI.AuditTestCase("getChildNodes", removeWhitespace(getChildNodes), {description: WI.UIString("This test will pass with all of the child nodes of the <body> element in the accessibility tree."), supports: 1}), >+ new WI.AuditTestCase("getComputedProperties", removeWhitespace(getComputedProperties), {description: WI.UIString("This test will pass with a variety of accessibility information about the <body> element."), supports: 3}), >+ new WI.AuditTestCase("getControlledNodes", removeWhitespace(getControlledNodes), {description: WI.UIString("This test will pass with all nodes controlled (\u0022%s\u0022) by the <body> element, if any exist.").format(WI.unlocalizedString("aria-controls")), supports: 1}), >+ new WI.AuditTestCase("getFlowedNodes", removeWhitespace(getFlowedNodes), {description: WI.UIString("This test will pass with all nodes flowed to (\u0022%s\u0022) from the <body> element, if any exist.").format(WI.unlocalizedString("aria-flowto")), supports: 1}), >+ new WI.AuditTestCase("getMouseEventNode", removeWhitespace(getMouseEventNode), {description: WI.UIString("This test will pass with the node that would handle mouse events for the <body> element, if applicable."), supports: 1}), >+ new WI.AuditTestCase("getOwnedNodes", removeWhitespace(getOwnedNodes), {description: WI.UIString("This test will pass with all nodes owned (\u0022%s\u0022) by the <body> element, if any exist.").format(WI.unlocalizedString("aria-owns")), supports: 1}), >+ new WI.AuditTestCase("getParentNode", removeWhitespace(getParentNode), {description: WI.UIString("This test will pass with the parent node of the <body> element in the accessibility tree."), supports: 1}), >+ new WI.AuditTestCase("getSelectedChildNodes", removeWhitespace(getSelectedChildNodes), {description: WI.UIString("This test will pass with all child nodes that are selected (\u0022%s\u0022) of the <body> element in the accessibility tree.").format(WI.unlocalizedString("aria-selected")), supports: 1}), >+ ], {description: WI.UIString("These tests demonstrate how to use %s to get information about the accessibility tree.").format(WI.unlocalizedString("WebInspectorAudit.Accessibility")), supports: 1}), >+ new WI.AuditTestGroup(WI.UIString("DOM"), [ >+ new WI.AuditTestCase("hasEventListeners", removeWhitespace(hasEventListeners), {description: WI.UIString("This test will pass with data indicating whether the <body> element has any event listeners."), supports: 3}), >+ new WI.AuditTestCase("hasEventListeners-click", removeWhitespace(hasEventListenersClick), {description: WI.UIString("This test will pass with data indicating whether the <body> element has any click event listeners."), supports: 3}), >+ ], {description: WI.UIString("These tests demonstrate how to use %s to get information about DOM nodes.").format(WI.unlocalizedString("WebInspectorAudit.DOM")), supports: 1}), >+ new WI.AuditTestGroup(WI.UIString("Resources"), [ >+ new WI.AuditTestCase("getResources", removeWhitespace(getResources), {description: WI.UIString("This test will pass with somee basic information about each resource."), supports: 3}), >+ new WI.AuditTestCase("getResourceContent", removeWhitespace(getResourceContent), {description: WI.UIString("This test will pass with the contents of the main resource."), supports: 3}), >+ ], {description: WI.UIString("These tests demonstrate how to use %s to get information about loaded resources.").format(WI.unlocalizedString("WebInspectorAudit.Resources")), supports: 2}), >+ ], {description: WI.UIString("These tests demonstrate how to use %s to access information not normally available to JavaScript.").format(WI.unlocalizedString("WebInspectorAudit")), supports: 1}), > ], {description: WI.UIString("These tests serve as a demonstration of the functionality and structure of audits.")}), > new WI.AuditTestGroup(WI.UIString("Accessibility"), [ >- new WI.AuditTestCase(`testMenuRoleForRequiredChidren`, testMenuRoleForRequiredChidren.toString(), {description: WI.UIString("Ensure that element of role \u0022%s\u0022 and \u0022%s\u0022 have required owned elements in accordance with WAI-ARIA.").format(WI.unlocalizedString("menu"), WI.unlocalizedString("menubar")), supports: 1}), >- new WI.AuditTestCase(`testGridRoleForRequiredChidren`, testGridRoleForRequiredChidren.toString(), {description: WI.UIString("Ensure that elements of role \u0022%s\u0022 have required owned elements in accordance with WAI-ARIA.").format(WI.unlocalizedString("grid")), supports: 1}), >- new WI.AuditTestCase(`testForAriaLabelledBySpelling`, testForAriaLabelledBySpelling.toString(), {description: WI.UIString("Ensure that \u0022%s\u0022 is spelled correctly.").format(WI.unlocalizedString("aria-labelledby")), supports: 1}), >- new WI.AuditTestCase(`testForMultipleBanners`, testForMultipleBanners.toString(), {description: WI.UIString("Ensure that only one banner is used on the page."), supports: 1}), >- new WI.AuditTestCase(`testForLinkLabels`, testForLinkLabels.toString(), {description: WI.UIString("Ensure that links have accessible labels for assistive technology."), supports: 1}), >- new WI.AuditTestCase(`testRowGroupRoleForRequiredChidren`, testRowGroupRoleForRequiredChidren.toString(), {description: WI.UIString("Ensure that element of role \u0022%s\u0022 have required owned elements in accordance with WAI-ARIA.").format(WI.unlocalizedString("rowgroup")), supports: 1}), >- new WI.AuditTestCase(`testTableRoleForRequiredChidren`, testTableRoleForRequiredChidren.toString(), {description: WI.UIString("Ensure that elements of role \u0022%s\u0022 have required owned elements in accordance with WAI-ARIA.").format(WI.unlocalizedString("table")), supports: 1}), >- new WI.AuditTestCase(`testForMultipleLiveRegions`, testForMultipleLiveRegions.toString(), {description: WI.UIString("Ensure that only one live region is used on the page."), supports: 1}), >- new WI.AuditTestCase(`testListBoxRoleForRequiredChidren`, testListBoxRoleForRequiredChidren.toString(), {description: WI.UIString("Ensure that elements of role \u0022%s\u0022 have required owned elements in accordance with WAI-ARIA.").format(WI.unlocalizedString("listbox")), supports: 1}), >- new WI.AuditTestCase(`testImageLabels`, testImageLabels.toString(), {description: WI.UIString("Ensure that elements of role \u0022%s\u0022 have accessible labels for assistive technology.").format(WI.unlocalizedString("img")), supports: 1}), >- new WI.AuditTestCase(`testForAriaHiddenFalse`, testForAriaHiddenFalse.toString(), {description: WI.UIString("Ensure aria-hidden=\u0022%s\u0022 is not used.").format(WI.unlocalizedString("false")), supports: 1}), >- new WI.AuditTestCase(`testTreeRoleForRequiredChidren`, testTreeRoleForRequiredChidren.toString(), {description: WI.UIString("Ensure that element of role \u0022%s\u0022 have required owned elements in accordance with WAI-ARIA.").format(WI.unlocalizedString("tree")), supports: 1}), >- new WI.AuditTestCase(`testRadioGroupRoleForRequiredChidren`, testRadioGroupRoleForRequiredChidren.toString(), {description: WI.UIString("Ensure that element of role \u0022%s\u0022 have required owned elements in accordance with WAI-ARIA.").format(WI.unlocalizedString("radiogroup")), supports: 1}), >- new WI.AuditTestCase(`testFeedRoleForRequiredChidren`, testFeedRoleForRequiredChidren.toString(), {description: WI.UIString("Ensure that elements of role \u0022%s\u0022 have required owned elements in accordance with WAI-ARIA.").format(WI.unlocalizedString("feed")), supports: 1}), >- new WI.AuditTestCase(`testTabListRoleForRequiredChidren`, testTabListRoleForRequiredChidren.toString(), {description: WI.UIString("Ensure that element of role \u0022%s\u0022 have required owned elements in accordance with WAI-ARIA.").format(WI.unlocalizedString("tablist")), supports: 1}), >- new WI.AuditTestCase(`testButtonLabels`, testButtonLabels.toString(), {description: WI.UIString("Ensure that buttons have accessible labels for assistive technology."), supports: 1}), >- new WI.AuditTestCase(`testRowRoleForRequiredChidren`, testRowRoleForRequiredChidren.toString(), {description: WI.UIString("Ensure that elements of role \u0022%s\u0022 have required owned elements in accordance with WAI-ARIA.").format(WI.unlocalizedString("row")), supports: 1}), >- new WI.AuditTestCase(`testListRoleForRequiredChidren`, testListRoleForRequiredChidren.toString(), {description: WI.UIString("Ensure that elements of role \u0022%s\u0022 have required owned elements in accordance with WAI-ARIA.").format(WI.unlocalizedString("list")), supports: 1}), >- new WI.AuditTestCase(`testComboBoxRoleForRequiredChidren`, testComboBoxRoleForRequiredChidren.toString(), {description: WI.UIString("Ensure that elements of role \u0022%s\u0022 have required owned elements in accordance with WAI-ARIA.").format(WI.unlocalizedString("combobox")), supports: 1}), >- new WI.AuditTestCase(`testForMultipleMainContentSections`, testForMultipleMainContentSections.toString(), {description: WI.UIString("Ensure that only one main content section is used on the page."), supports: 1}), >- new WI.AuditTestCase(`testDialogsForLabels`, testDialogsForLabels.toString(), {description: WI.UIString("Ensure that dialogs have accessible labels for assistive technology."), supports: 1}), >- new WI.AuditTestCase(`testForInvalidAriaHiddenValue`, testForInvalidAriaHiddenValue.toString(), {description: WI.UIString("Ensure that values for \u0022%s\u0022 are valid.").format(WI.unlocalizedString("aria-hidden")), supports: 1}) >+ new WI.AuditTestCase("testMenuRoleForRequiredChidren", removeWhitespace(testMenuRoleForRequiredChidren), {description: WI.UIString("Ensure that element of role \u0022%s\u0022 and \u0022%s\u0022 have required owned elements in accordance with WAI-ARIA.").format(WI.unlocalizedString("menu"), WI.unlocalizedString("menubar")), supports: 1}), >+ new WI.AuditTestCase("testGridRoleForRequiredChidren", removeWhitespace(testGridRoleForRequiredChidren), {description: WI.UIString("Ensure that elements of role \u0022%s\u0022 have required owned elements in accordance with WAI-ARIA.").format(WI.unlocalizedString("grid")), supports: 1}), >+ new WI.AuditTestCase("testForAriaLabelledBySpelling", removeWhitespace(testForAriaLabelledBySpelling), {description: WI.UIString("Ensure that \u0022%s\u0022 is spelled correctly.").format(WI.unlocalizedString("aria-labelledby")), supports: 1}), >+ new WI.AuditTestCase("testForMultipleBanners", removeWhitespace(testForMultipleBanners), {description: WI.UIString("Ensure that only one banner is used on the page."), supports: 1}), >+ new WI.AuditTestCase("testForLinkLabels", removeWhitespace(testForLinkLabels), {description: WI.UIString("Ensure that links have accessible labels for assistive technology."), supports: 1}), >+ new WI.AuditTestCase("testRowGroupRoleForRequiredChidren", removeWhitespace(testRowGroupRoleForRequiredChidren), {description: WI.UIString("Ensure that element of role \u0022%s\u0022 have required owned elements in accordance with WAI-ARIA.").format(WI.unlocalizedString("rowgroup")), supports: 1}), >+ new WI.AuditTestCase("testTableRoleForRequiredChidren", removeWhitespace(testTableRoleForRequiredChidren), {description: WI.UIString("Ensure that elements of role \u0022%s\u0022 have required owned elements in accordance with WAI-ARIA.").format(WI.unlocalizedString("table")), supports: 1}), >+ new WI.AuditTestCase("testForMultipleLiveRegions", removeWhitespace(testForMultipleLiveRegions), {description: WI.UIString("Ensure that only one live region is used on the page."), supports: 1}), >+ new WI.AuditTestCase("testListBoxRoleForRequiredChidren", removeWhitespace(testListBoxRoleForRequiredChidren), {description: WI.UIString("Ensure that elements of role \u0022%s\u0022 have required owned elements in accordance with WAI-ARIA.").format(WI.unlocalizedString("listbox")), supports: 1}), >+ new WI.AuditTestCase("testImageLabels", removeWhitespace(testImageLabels), {description: WI.UIString("Ensure that elements of role \u0022%s\u0022 have accessible labels for assistive technology.").format(WI.unlocalizedString("img")), supports: 1}), >+ new WI.AuditTestCase("testForAriaHiddenFalse", removeWhitespace(testForAriaHiddenFalse), {description: WI.UIString("Ensure aria-hidden=\u0022%s\u0022 is not used.").format(WI.unlocalizedString("false")), supports: 1}), >+ new WI.AuditTestCase("testTreeRoleForRequiredChidren", removeWhitespace(testTreeRoleForRequiredChidren), {description: WI.UIString("Ensure that element of role \u0022%s\u0022 have required owned elements in accordance with WAI-ARIA.").format(WI.unlocalizedString("tree")), supports: 1}), >+ new WI.AuditTestCase("testRadioGroupRoleForRequiredChidren", removeWhitespace(testRadioGroupRoleForRequiredChidren), {description: WI.UIString("Ensure that element of role \u0022%s\u0022 have required owned elements in accordance with WAI-ARIA.").format(WI.unlocalizedString("radiogroup")), supports: 1}), >+ new WI.AuditTestCase("testFeedRoleForRequiredChidren", removeWhitespace(testFeedRoleForRequiredChidren), {description: WI.UIString("Ensure that elements of role \u0022%s\u0022 have required owned elements in accordance with WAI-ARIA.").format(WI.unlocalizedString("feed")), supports: 1}), >+ new WI.AuditTestCase("testTabListRoleForRequiredChidren", removeWhitespace(testTabListRoleForRequiredChidren), {description: WI.UIString("Ensure that element of role \u0022%s\u0022 have required owned elements in accordance with WAI-ARIA.").format(WI.unlocalizedString("tablist")), supports: 1}), >+ new WI.AuditTestCase("testButtonLabels", removeWhitespace(testButtonLabels), {description: WI.UIString("Ensure that buttons have accessible labels for assistive technology."), supports: 1}), >+ new WI.AuditTestCase("testRowRoleForRequiredChidren", removeWhitespace(testRowRoleForRequiredChidren), {description: WI.UIString("Ensure that elements of role \u0022%s\u0022 have required owned elements in accordance with WAI-ARIA.").format(WI.unlocalizedString("row")), supports: 1}), >+ new WI.AuditTestCase("testListRoleForRequiredChidren", removeWhitespace(testListRoleForRequiredChidren), {description: WI.UIString("Ensure that elements of role \u0022%s\u0022 have required owned elements in accordance with WAI-ARIA.").format(WI.unlocalizedString("list")), supports: 1}), >+ new WI.AuditTestCase("testComboBoxRoleForRequiredChidren", removeWhitespace(testComboBoxRoleForRequiredChidren), {description: WI.UIString("Ensure that elements of role \u0022%s\u0022 have required owned elements in accordance with WAI-ARIA.").format(WI.unlocalizedString("combobox")), supports: 1}), >+ new WI.AuditTestCase("testForMultipleMainContentSections", removeWhitespace(testForMultipleMainContentSections), {description: WI.UIString("Ensure that only one main content section is used on the page."), supports: 1}), >+ new WI.AuditTestCase("testDialogsForLabels", removeWhitespace(testDialogsForLabels), {description: WI.UIString("Ensure that dialogs have accessible labels for assistive technology."), supports: 1}), >+ new WI.AuditTestCase("testForInvalidAriaHiddenValue", removeWhitespace(testForInvalidAriaHiddenValue), {description: WI.UIString("Ensure that values for \u0022%s\u0022 are valid.").format(WI.unlocalizedString("aria-hidden")), supports: 1}) > ], {description: WI.UIString("Diagnoses common accessibility problems affecting screen readers and other assistive technology.")}), > ]; >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 198719
:
371746
|
371748
|
371756
| 373304