From 8e4ee9cc37ffb9564b1575127d1b388adadea049 Mon Sep 17 00:00:00 2001 From: Shane Exterkamp Date: Tue, 29 Jan 2019 16:02:45 -0800 Subject: [PATCH 1/2] i18n a11y title and desc. --- lighthouse-core/config/default-config.js | 12 +++++++++--- lighthouse-core/lib/i18n/en-US.json | 12 ++++++++++++ lighthouse-core/test/results/sample_v2.json | 9 +++++++++ 3 files changed, 30 insertions(+), 3 deletions(-) diff --git a/lighthouse-core/config/default-config.js b/lighthouse-core/config/default-config.js index a105840f5eee..3414298e7f15 100644 --- a/lighthouse-core/config/default-config.js +++ b/lighthouse-core/config/default-config.js @@ -31,6 +31,12 @@ const UIStrings = { diagnosticsGroupTitle: 'Diagnostics', /** Description of the diagnostics section of the Performance category. Within this section are audits with non-imperative titles that provide more detail on the page's page load performance characteristics. Whereas the 'Opportunities' suggest an action along with expected time savings, diagnostics do not. Within this section, the user may read the details and deduce additional actions they could take. */ diagnosticsGroupDescription: 'More information about the performance of your application.', + /** Title of the Accessibility category of audits. Accessibility contains audits focused on making web content accessible to users with disabilities. Also used as a label of a score gauge; try to limit to 20 characters. */ + a11yCategoryTitle: 'Accessibility', + /** Description of the Accessibility category. This is displayed immediately under the Accessibility title element. No character length limits. 'improve the accessibility of your web app' becomes link text to additional documentation. */ + a11yCategoryDescription: '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.', + /** Description of the Accessibility manual checks category. This is displayed above the manual checks section of the Accessibility category. No character length limits. 'conducting an accessibility review' becomes link text to additional documentation. */ + a11yCategoryManualDescription: '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).', /* Title of the color contrast section within the Accessibility category. Within this section are audits with descriptive titles that highlight the color and vision aspects of the page's accessibility that are passing or failing. */ a11yColorContrastGroupTitle: 'Color Contrast Is Satisfactory', /* Description of the color contrast section within the Accessibility category. Within this section are audits with descriptive titles that highlight the color and vision aspects of the page's accessibility that are passing or failing. */ @@ -357,9 +363,9 @@ const defaultConfig = { ], }, 'accessibility': { - title: 'Accessibility', - 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.', - 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).', + title: str_(UIStrings.a11yCategoryTitle), + description: str_(UIStrings.a11yCategoryDescription), + manualDescription: str_(UIStrings.a11yCategoryManualDescription), auditRefs: [ {id: 'aria-allowed-attr', weight: 3, group: 'a11y-aria'}, {id: 'aria-required-attr', weight: 2, group: 'a11y-aria'}, diff --git a/lighthouse-core/lib/i18n/en-US.json b/lighthouse-core/lib/i18n/en-US.json index e0d76a9b7875..dab974e7c8c9 100644 --- a/lighthouse-core/lib/i18n/en-US.json +++ b/lighthouse-core/lib/i18n/en-US.json @@ -815,6 +815,18 @@ "message": "ARIA Attributes Follow Best Practices", "description": "Title of the ARIA validity section within the Accessibility category. Within this section are audits with descriptive titles that highlight if whether all the aria- HTML attributes have been used properly." }, + "lighthouse-core/config/default-config.js | a11yCategoryDescription": { + "message": "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.", + "description": "Description of the Accessibility category. This is displayed immediately under the Accessibility title element. No character length limits. 'improve the accessibility of your web app' becomes link text to additional documentation." + }, + "lighthouse-core/config/default-config.js | a11yCategoryManualDescription": { + "message": "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).", + "description": "Description of the Accessibility manual checks category. This is displayed above the manual checks section of the Accessibility category. No character length limits. 'conducting an accessibility review' becomes link text to additional documentation." + }, + "lighthouse-core/config/default-config.js | a11yCategoryTitle": { + "message": "Accessibility", + "description": "Title of the Accessibility category of audits. Accessibility contains audits focused on making web content accessible to users with disabilities. Also used as a label of a score gauge; try to limit to 20 characters." + }, "lighthouse-core/config/default-config.js | a11yColorContrastGroupDescription": { "message": "These are opportunities to improve the legibility of your content.", "description": "Description of the color contrast section within the Accessibility category. Within this section are audits with descriptive titles that highlight the color and vision aspects of the page's accessibility that are passing or failing." diff --git a/lighthouse-core/test/results/sample_v2.json b/lighthouse-core/test/results/sample_v2.json index 079be8601663..258b11b42c5f 100644 --- a/lighthouse-core/test/results/sample_v2.json +++ b/lighthouse-core/test/results/sample_v2.json @@ -5027,6 +5027,15 @@ "lighthouse-core/config/default-config.js | performanceCategoryTitle": [ "categories.performance.title" ], + "lighthouse-core/config/default-config.js | a11yCategoryTitle": [ + "categories.accessibility.title" + ], + "lighthouse-core/config/default-config.js | a11yCategoryDescription": [ + "categories.accessibility.description" + ], + "lighthouse-core/config/default-config.js | a11yCategoryManualDescription": [ + "categories.accessibility.manualDescription" + ], "lighthouse-core/config/default-config.js | metricGroupTitle": [ "categoryGroups.metrics.title" ], From 17094f31a99355d74a30c2be2ffe9842f8d6b8df Mon Sep 17 00:00:00 2001 From: Shane Exterkamp Date: Wed, 30 Jan 2019 10:21:19 -0800 Subject: [PATCH 2/2] Feedback! --- lighthouse-core/config/default-config.js | 6 +++--- lighthouse-core/lib/i18n/en-US.json | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lighthouse-core/config/default-config.js b/lighthouse-core/config/default-config.js index 3414298e7f15..162feb681f97 100644 --- a/lighthouse-core/config/default-config.js +++ b/lighthouse-core/config/default-config.js @@ -31,11 +31,11 @@ const UIStrings = { diagnosticsGroupTitle: 'Diagnostics', /** Description of the diagnostics section of the Performance category. Within this section are audits with non-imperative titles that provide more detail on the page's page load performance characteristics. Whereas the 'Opportunities' suggest an action along with expected time savings, diagnostics do not. Within this section, the user may read the details and deduce additional actions they could take. */ diagnosticsGroupDescription: 'More information about the performance of your application.', - /** Title of the Accessibility category of audits. Accessibility contains audits focused on making web content accessible to users with disabilities. Also used as a label of a score gauge; try to limit to 20 characters. */ + /** Title of the Accessibility category of audits. This section contains audits focused on making web content accessible to users with disabilities. Also used as a label of a score gauge; try to limit to 20 characters. */ a11yCategoryTitle: 'Accessibility', - /** Description of the Accessibility category. This is displayed immediately under the Accessibility title element. No character length limits. 'improve the accessibility of your web app' becomes link text to additional documentation. */ + /** Description of the Accessibility category. This is displayed at the top of a list of audits focused on making web content accessible to users with disabilities. No character length limits. 'improve the accessibility of your web app' becomes link text to additional documentation. */ a11yCategoryDescription: '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.', - /** Description of the Accessibility manual checks category. This is displayed above the manual checks section of the Accessibility category. No character length limits. 'conducting an accessibility review' becomes link text to additional documentation. */ + /** Description of the Accessibility manual checks category. This description is displayed above a list of accessibility audits that currently have no automated test and so must be verified manually by the user. No character length limits. 'conducting an accessibility review' becomes link text to additional documentation. */ a11yCategoryManualDescription: '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).', /* Title of the color contrast section within the Accessibility category. Within this section are audits with descriptive titles that highlight the color and vision aspects of the page's accessibility that are passing or failing. */ a11yColorContrastGroupTitle: 'Color Contrast Is Satisfactory', diff --git a/lighthouse-core/lib/i18n/en-US.json b/lighthouse-core/lib/i18n/en-US.json index dab974e7c8c9..6e68afd3ea15 100644 --- a/lighthouse-core/lib/i18n/en-US.json +++ b/lighthouse-core/lib/i18n/en-US.json @@ -817,15 +817,15 @@ }, "lighthouse-core/config/default-config.js | a11yCategoryDescription": { "message": "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.", - "description": "Description of the Accessibility category. This is displayed immediately under the Accessibility title element. No character length limits. 'improve the accessibility of your web app' becomes link text to additional documentation." + "description": "Description of the Accessibility category. This is displayed at the top of a list of audits focused on making web content accessible to users with disabilities. No character length limits. 'improve the accessibility of your web app' becomes link text to additional documentation." }, "lighthouse-core/config/default-config.js | a11yCategoryManualDescription": { "message": "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).", - "description": "Description of the Accessibility manual checks category. This is displayed above the manual checks section of the Accessibility category. No character length limits. 'conducting an accessibility review' becomes link text to additional documentation." + "description": "Description of the Accessibility manual checks category. This description is displayed above a list of accessibility audits that currently have no automated test and so must be verified manually by the user. No character length limits. 'conducting an accessibility review' becomes link text to additional documentation." }, "lighthouse-core/config/default-config.js | a11yCategoryTitle": { "message": "Accessibility", - "description": "Title of the Accessibility category of audits. Accessibility contains audits focused on making web content accessible to users with disabilities. Also used as a label of a score gauge; try to limit to 20 characters." + "description": "Title of the Accessibility category of audits. This section contains audits focused on making web content accessible to users with disabilities. Also used as a label of a score gauge; try to limit to 20 characters." }, "lighthouse-core/config/default-config.js | a11yColorContrastGroupDescription": { "message": "These are opportunities to improve the legibility of your content.",