From 85411164ad4c90cc5276b008a207094b83c6385d Mon Sep 17 00:00:00 2001 From: zepumph Date: Mon, 1 Feb 2021 16:36:30 -0900 Subject: [PATCH] interactive descriptions -> interactive description, https://github.com/phetsims/a11y-research/issues/157 --- js/grunt/Gruntfile.js | 4 ++-- js/grunt/buildRunnable.js | 2 +- js/initialize-globals.js | 8 ++++---- templates/sim-a11y-view.html | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/js/grunt/Gruntfile.js b/js/grunt/Gruntfile.js index 9ddc85dbb..97a4d68ec 100644 --- a/js/grunt/Gruntfile.js +++ b/js/grunt/Gruntfile.js @@ -336,7 +336,7 @@ module.exports = function( grunt ) { grunt.registerTask( 'generate-a11y-view-html', 'Generates top-level SIM-a11y-view.html file used for visualizing accessible content. Usually you should ' + - 'set the "supportsInteractiveDescriptions":true flag in the sim package.json and run `grunt update` instead of manually generating this.', + 'set the "supportsInteractiveDescription":true flag in the sim package.json and run `grunt update` instead of manually generating this.', wrapTask( async () => { generateA11yViewHTML( repo ); } ) ); @@ -360,7 +360,7 @@ Updates the normal automatically-generated files for this repository. Includes: grunt.task.run( 'modulify' ); grunt.task.run( 'generate-development-html' ); - if ( packageObject.phet.supportsInteractiveDescriptions ) { + if ( packageObject.phet.supportsInteractiveDescription ) { grunt.task.run( 'generate-a11y-view-html' ); } if ( packageObject.phet.colorProfile ) { diff --git a/js/grunt/buildRunnable.js b/js/grunt/buildRunnable.js index f09b3a930..5b51c1063 100644 --- a/js/grunt/buildRunnable.js +++ b/js/grunt/buildRunnable.js @@ -319,7 +319,7 @@ module.exports = async function( repo, minifyOptions, instrument, allHTML, brand } // If the sim is a11y outfitted, then add the a11y pdom viewer to the build dir. NOTE: Not for phet-io builds. - if ( packageObject.phet.supportsInteractiveDescriptions && brand === 'phet' ) { + if ( packageObject.phet.supportsInteractiveDescription && brand === 'phet' ) { // (a11y) Create the a11y-view HTML file for PDOM viewing. let a11yHTML = getA11yViewHTMLFromTemplate( repo ); diff --git a/js/initialize-globals.js b/js/initialize-globals.js index ccb734c6d..5be490e90 100644 --- a/js/initialize-globals.js +++ b/js/initialize-globals.js @@ -558,13 +558,13 @@ * Whether interactive description accessibility features are enabled or not. Use this option to render the * Parallel DOM for keyboard navigation and screen reader based auditory descriptions. This query parameter is * meant for internal use only, simulations published with accessibility enabled should use the - * `package.json` flag `"supportsInteractiveDescriptions": true`. + * `package.json` flag `"supportsInteractiveDescription": true`. * - * Use this to enable accessibility, but do NOT use this to determine whether interactive descriptions are enabled for + * Use this to enable accessibility, but do NOT use this to determine whether interactive description is enabled for * a sim. This is because `package.json` flags can also enable accessibility features, so please use - * phet.joist.sim.supportsInteractiveDescriptions if you need to know whether description is enabled globally. + * phet.joist.sim.supportsInteractiveDescription if you need to know whether description is enabled globally. */ - supportsDescriptions: { type: 'flag' }, + supportsDescription: { type: 'flag' }, /** * Indicates whether enhanced sounds are used in addition to basic sounds as part of the sound design. If true, the diff --git a/templates/sim-a11y-view.html b/templates/sim-a11y-view.html index ea27f9b64..d1a7a9f49 100644 --- a/templates/sim-a11y-view.html +++ b/templates/sim-a11y-view.html @@ -224,10 +224,10 @@

PDOM & Descriptions for {{PHET_SIM_TITLE}}

} const noPostMessage = simulationQueryString.indexOf( 'postMessageOnLoad&postMessageOnError' ) === -1; - const noAccessibility = simulationQueryString.indexOf( 'supportsDescriptions' ) === -1; + const noAccessibility = simulationQueryString.indexOf( 'supportsDescription' ) === -1; noPostMessage && ( simulationQueryString += 'postMessageOnLoad&postMessageOnError&' ); - noAccessibility && ( simulationQueryString += 'supportsDescriptions' ); + noAccessibility && ( simulationQueryString += 'supportsDescription' ); const repoLocale = '{{PHET_REPOSITORY}}_en'; const filenameEnding = IS_BUILT ? '_phet.html' : '.html';