Skip to content

Commit

Permalink
tests: update a11y sample artifacts (#9010)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattzeunert authored and brendankenny committed May 24, 2019
1 parent de594c8 commit cece504
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 94 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ describe('CategoryRenderer', () => {
const categoryDOM = renderer.render(category, sampleResults.categoryGroups);

const gauge = categoryDOM.querySelector('.lh-gauge__percentage');
assert.equal(gauge.textContent.trim(), '38', 'score is 0-100');
assert.equal(gauge.textContent.trim(), '46', 'score is 0-100');

const score = categoryDOM.querySelector('.lh-category-header');
const value = categoryDOM.querySelector('.lh-gauge__percentage');
Expand Down
83 changes: 14 additions & 69 deletions lighthouse-core/test/results/artifacts/artifacts.json
Original file line number Diff line number Diff line change
Expand Up @@ -1337,29 +1337,28 @@
],
"notApplicable": [
{
"id": "aria-allowed-attr",
"id": "accesskeys",
"impact": null,
"tags": [
"cat.aria",
"wcag2a",
"wcag412"
"best-practice",
"cat.keyboard"
],
"description": "Ensures ARIA attributes are allowed for an element's role",
"help": "Elements must only use allowed ARIA attributes",
"helpUrl": "https://dequeuniversity.com/rules/axe/3.1/aria-allowed-attr?application=axeAPI",
"description": "Ensures every accesskey attribute value is unique",
"help": "accesskey attribute value must be unique",
"helpUrl": "https://dequeuniversity.com/rules/axe/3.2/accesskeys?application=axeAPI",
"nodes": []
},
{
"id": "aria-dpub-role-fallback",
"id": "aria-allowed-attr",
"impact": null,
"tags": [
"cat.aria",
"wcag2a",
"wcag131"
"wcag412"
],
"description": "Ensures unsupported DPUB roles are only used on elements with implicit fallback roles",
"help": "Unsupported DPUB ARIA roles should be used on elements with implicit fallback roles",
"helpUrl": "https://dequeuniversity.com/rules/axe/3.1/aria-dpub-role-fallback?application=axeAPI",
"description": "Ensures ARIA attributes are allowed for an element's role",
"help": "Elements must only use allowed ARIA attributes",
"helpUrl": "https://dequeuniversity.com/rules/axe/3.2/aria-allowed-attr?application=axeAPI",
"nodes": []
},
{
Expand Down Expand Up @@ -1452,22 +1451,7 @@
],
"description": "Ensures <audio> elements have captions",
"help": "<audio> elements must have a captions track",
"helpUrl": "https://dequeuniversity.com/rules/axe/3.1/audio-caption?application=axeAPI",
"nodes": []
},
{
"id": "button-name",
"impact": null,
"tags": [
"cat.name-role-value",
"wcag2a",
"wcag412",
"section508",
"section508.22.a"
],
"description": "Ensures buttons have discernible text",
"help": "Buttons must have discernible text",
"helpUrl": "https://dequeuniversity.com/rules/axe/3.1/button-name?application=axeAPI",
"helpUrl": "https://dequeuniversity.com/rules/axe/3.2/audio-caption?application=axeAPI",
"nodes": []
},
{
Expand All @@ -1493,33 +1477,7 @@
],
"description": "Ensures <dt> and <dd> elements are contained by a <dl>",
"help": "<dt> and <dd> elements must be contained by a <dl>",
"helpUrl": "https://dequeuniversity.com/rules/axe/3.1/dlitem?application=axeAPI",
"nodes": []
},
{
"id": "duplicate-id-active",
"impact": null,
"tags": [
"cat.parsing",
"wcag2a",
"wcag411"
],
"description": "Ensures every id attribute value of active elements is unique",
"help": "IDs of active elements must be unique",
"helpUrl": "https://dequeuniversity.com/rules/axe/3.1/duplicate-id-active?application=axeAPI",
"nodes": []
},
{
"id": "duplicate-id-aria",
"impact": null,
"tags": [
"cat.parsing",
"wcag2a",
"wcag411"
],
"description": "Ensures every id attribute value used in ARIA and in labels is unique",
"help": "IDs used in ARIA and labels must be unique",
"helpUrl": "https://dequeuniversity.com/rules/axe/3.1/duplicate-id-aria?application=axeAPI",
"helpUrl": "https://dequeuniversity.com/rules/axe/3.2/dlitem?application=axeAPI",
"nodes": []
},
{
Expand Down Expand Up @@ -1548,20 +1506,7 @@
],
"description": "Ensures the lang attribute of the <html> element has a valid value",
"help": "<html> element must have a valid value for the lang attribute",
"helpUrl": "https://dequeuniversity.com/rules/axe/3.1/html-lang-valid?application=axeAPI",
"nodes": []
},
{
"id": "html-xml-lang-mismatch",
"impact": null,
"tags": [
"cat.language",
"wcag2a",
"wcag311"
],
"description": "Ensure that HTML elements with both valid lang and xml:lang attributes agree on the base language of the page",
"help": "HTML elements with lang and xml:lang must have the same base language",
"helpUrl": "https://dequeuniversity.com/rules/axe/3.1/html-xml-lang-mismatch?application=axeAPI",
"helpUrl": "https://dequeuniversity.com/rules/axe/3.2/html-lang-valid?application=axeAPI",
"nodes": []
},
{
Expand Down
24 changes: 12 additions & 12 deletions lighthouse-core/test/results/sample_v2.json
Original file line number Diff line number Diff line change
Expand Up @@ -1493,13 +1493,8 @@
"id": "accesskeys",
"title": "`[accesskey]` values are unique",
"description": "Access keys let users quickly focus a part of the page. For proper navigation, each access key must be unique. [Learn more](https://dequeuniversity.com/rules/axe/3.1/accesskeys?application=lighthouse).",
"score": 1,
"scoreDisplayMode": "binary",
"details": {
"type": "table",
"headings": [],
"items": []
}
"score": null,
"scoreDisplayMode": "notApplicable"
},
"aria-allowed-attr": {
"id": "aria-allowed-attr",
Expand Down Expand Up @@ -1561,8 +1556,13 @@
"id": "button-name",
"title": "Buttons have an accessible name",
"description": "When a button doesn't have an accessible name, screen readers announce it as \"button\", making it unusable for users who rely on screen readers. [Learn more](https://dequeuniversity.com/rules/axe/3.1/button-name?application=lighthouse).",
"score": null,
"scoreDisplayMode": "notApplicable"
"score": 1,
"scoreDisplayMode": "binary",
"details": {
"type": "table",
"headings": [],
"items": []
}
},
"bypass": {
"id": "bypass",
Expand Down Expand Up @@ -3523,7 +3523,7 @@
"auditRefs": [
{
"id": "accesskeys",
"weight": 3,
"weight": 0,
"group": "a11y-navigation"
},
{
Expand Down Expand Up @@ -3568,7 +3568,7 @@
},
{
"id": "button-name",
"weight": 0,
"weight": 10,
"group": "a11y-names-labels"
},
{
Expand Down Expand Up @@ -3742,7 +3742,7 @@
}
],
"id": "accessibility",
"score": 0.38
"score": 0.46
},
"best-practices": {
"title": "Best Practices",
Expand Down
24 changes: 12 additions & 12 deletions proto/sample_v2_round_trip.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,9 @@
"audits": {
"accesskeys": {
"description": "Access keys let users quickly focus a part of the page. For proper navigation, each access key must be unique. [Learn more](https://dequeuniversity.com/rules/axe/3.1/accesskeys?application=lighthouse).",
"details": {
"headings": [],
"items": [],
"type": "table"
},
"id": "accesskeys",
"score": 1.0,
"scoreDisplayMode": "binary",
"score": null,
"scoreDisplayMode": "notApplicable",
"title": "`[accesskey]` values are unique"
},
"appcache-manifest": {
Expand Down Expand Up @@ -152,9 +147,14 @@
},
"button-name": {
"description": "When a button doesn't have an accessible name, screen readers announce it as \"button\", making it unusable for users who rely on screen readers. [Learn more](https://dequeuniversity.com/rules/axe/3.1/button-name?application=lighthouse).",
"details": {
"headings": [],
"items": [],
"type": "table"
},
"id": "button-name",
"score": null,
"scoreDisplayMode": "notApplicable",
"score": 1.0,
"scoreDisplayMode": "binary",
"title": "Buttons have an accessible name"
},
"bypass": {
Expand Down Expand Up @@ -3163,7 +3163,7 @@
{
"group": "a11y-navigation",
"id": "accesskeys",
"weight": 3.0
"weight": 0.0
},
{
"group": "a11y-aria",
Expand Down Expand Up @@ -3208,7 +3208,7 @@
{
"group": "a11y-names-labels",
"id": "button-name",
"weight": 0.0
"weight": 10.0
},
{
"group": "a11y-navigation",
Expand Down Expand Up @@ -3383,7 +3383,7 @@
"description": "These checks highlight opportunities to [improve the accessibility of your web app](https://developers.google.com/web/fundamentals/accessibility). Only a subset of accessibility issues can be automatically detected so manual testing is also encouraged.",
"id": "accessibility",
"manualDescription": "These items address areas which an automated testing tool cannot cover. Learn more in our guide on [conducting an accessibility review](https://developers.google.com/web/fundamentals/accessibility/how-to-review).",
"score": 0.38,
"score": 0.46,
"title": "Accessibility"
},
"best-practices": {
Expand Down

0 comments on commit cece504

Please sign in to comment.