diff --git a/curriculum/challenges/english/01-responsive-web-design/applied-accessibility/add-a-text-alternative-to-images-for-visually-impaired-accessibility.english.md b/curriculum/challenges/english/01-responsive-web-design/applied-accessibility/add-a-text-alternative-to-images-for-visually-impaired-accessibility.english.md index 56583fb5e5..2812960de4 100644 --- a/curriculum/challenges/english/01-responsive-web-design/applied-accessibility/add-a-text-alternative-to-images-for-visually-impaired-accessibility.english.md +++ b/curriculum/challenges/english/01-responsive-web-design/applied-accessibility/add-a-text-alternative-to-images-for-visually-impaired-accessibility.english.md @@ -24,8 +24,8 @@ Camper Cat happens to be both a coding ninja and an actual ninja, and is buildin ```yml tests: - - text: 'Your img tag should have an alt attribute, and it should not be empty.' - testString: 'assert($("img").attr("alt"), "Your img tag should have an alt attribute, and it should not be empty.");' + - text: Your img tag should have an alt attribute, and it should not be empty. + testString: assert($('img').attr('alt'), 'Your img tag should have an alt attribute, and it should not be empty.'); ``` diff --git a/curriculum/challenges/english/01-responsive-web-design/applied-accessibility/add-an-accessible-date-picker.english.md b/curriculum/challenges/english/01-responsive-web-design/applied-accessibility/add-an-accessible-date-picker.english.md index 937db0dab8..cfacf91227 100644 --- a/curriculum/challenges/english/01-responsive-web-design/applied-accessibility/add-an-accessible-date-picker.english.md +++ b/curriculum/challenges/english/01-responsive-web-design/applied-accessibility/add-an-accessible-date-picker.english.md @@ -25,13 +25,13 @@ Camper Cat is setting up a Mortal Kombat tournament and wants to ask his competi ```yml tests: - text: Your code should add one input tag for the date selector field. - testString: 'assert($("input").length == 2, "Your code should add one input tag for the date selector field.");' + testString: assert($('input').length == 2, 'Your code should add one input tag for the date selector field.'); - text: Your input tag should have a type attribute with a value of date. - testString: 'assert($("input").attr("type") == "date", "Your input tag should have a type attribute with a value of date.");' + testString: assert($('input').attr('type') == 'date', 'Your input tag should have a type attribute with a value of date.'); - text: Your input tag should have an id attribute with a value of pickdate. - testString: 'assert($("input").attr("id") == "pickdate", "Your input tag should have an id attribute with a value of pickdate.");' + testString: assert($('input').attr('id') == 'pickdate', 'Your input tag should have an id attribute with a value of pickdate.'); - text: Your input tag should have a name attribute with a value of date. - testString: 'assert($("input").attr("name") == "date", "Your input tag should have a name attribute with a value of date.");' + testString: assert($('input').attr('name') == 'date', 'Your input tag should have a name attribute with a value of date.'); ``` diff --git a/curriculum/challenges/english/01-responsive-web-design/applied-accessibility/avoid-colorblindness-issues-by-carefully-choosing-colors-that-convey-information.english.md b/curriculum/challenges/english/01-responsive-web-design/applied-accessibility/avoid-colorblindness-issues-by-carefully-choosing-colors-that-convey-information.english.md index 555177dcdc..572bece89a 100644 --- a/curriculum/challenges/english/01-responsive-web-design/applied-accessibility/avoid-colorblindness-issues-by-carefully-choosing-colors-that-convey-information.english.md +++ b/curriculum/challenges/english/01-responsive-web-design/applied-accessibility/avoid-colorblindness-issues-by-carefully-choosing-colors-that-convey-information.english.md @@ -23,7 +23,7 @@ Camper Cat is testing different styles for an important button, but the yellow ( ```yml tests: - text: Your code should change the text color for the button to the dark blue. - testString: 'assert($("button").css("color") == "rgb(0, 51, 102)", "Your code should change the text color for the button to the dark blue.");' + testString: assert($('button').css('color') == 'rgb(0, 51, 102)', 'Your code should change the text color for the button to the dark blue.'); ``` diff --git a/curriculum/challenges/english/01-responsive-web-design/applied-accessibility/avoid-colorblindness-issues-by-using-sufficient-contrast.english.md b/curriculum/challenges/english/01-responsive-web-design/applied-accessibility/avoid-colorblindness-issues-by-using-sufficient-contrast.english.md index b605778eaa..137a9150d1 100644 --- a/curriculum/challenges/english/01-responsive-web-design/applied-accessibility/avoid-colorblindness-issues-by-using-sufficient-contrast.english.md +++ b/curriculum/challenges/english/01-responsive-web-design/applied-accessibility/avoid-colorblindness-issues-by-using-sufficient-contrast.english.md @@ -24,9 +24,9 @@ Camper Cat is experimenting with using color for his blog text and background, b ```yml tests: - text: Your code should only change the lightness value for the text color property to a value of 15%. - testString: 'assert(code.match(/color:\s*?hsl\(0,\s*?55%,\s*?15%\)/gi), "Your code should only change the lightness value for the text color property to a value of 15%.");' + testString: assert(code.match(/color:\s*?hsl\(0,\s*?55%,\s*?15%\)/gi), 'Your code should only change the lightness value for the text color property to a value of 15%.'); - text: Your code should only change the lightness value for the background-color property to a value of 55%. - testString: 'assert(code.match(/background-color:\s*?hsl\(120,\s*?25%,\s*?55%\)/gi), "Your code should only change the lightness value for the background-color property to a value of 55%.");' + testString: assert(code.match(/background-color:\s*?hsl\(120,\s*?25%,\s*?55%\)/gi), 'Your code should only change the lightness value for the background-color property to a value of 55%.'); ``` diff --git a/curriculum/challenges/english/01-responsive-web-design/applied-accessibility/give-links-meaning-by-using-descriptive-link-text.english.md b/curriculum/challenges/english/01-responsive-web-design/applied-accessibility/give-links-meaning-by-using-descriptive-link-text.english.md index e5a3f8a07c..1296afb493 100644 --- a/curriculum/challenges/english/01-responsive-web-design/applied-accessibility/give-links-meaning-by-using-descriptive-link-text.english.md +++ b/curriculum/challenges/english/01-responsive-web-design/applied-accessibility/give-links-meaning-by-using-descriptive-link-text.english.md @@ -22,9 +22,9 @@ The link text that Camper Cat is using is not very descriptive without the surro ```yml tests: - text: Your code should move the anchor a tags from around the words "Click here" to wrap around the words "information about batteries". - testString: 'assert($("a").text().match(/^(information about batteries)$/g), "Your code should move the anchor a tags from around the words "Click here" to wrap around the words "information about batteries".");' + testString: assert($('a').text().match(/^(information about batteries)$/g), 'Your code should move the anchor a tags from around the words "Click here" to wrap around the words "information about batteries".'); - text: Make sure your a element has a closing tag. - testString: 'assert(code.match(/<\/a>/g) && code.match(/<\/a>/g).length === code.match(//g).length, "Make sure your a element has a closing tag.");' + testString: assert(code.match(/<\/a>/g) && code.match(/<\/a>/g).length === code.match(//g).length, 'Make sure your a element has a closing tag.'); ``` diff --git a/curriculum/challenges/english/01-responsive-web-design/applied-accessibility/improve-accessibility-of-audio-content-with-the-audio-element.english.md b/curriculum/challenges/english/01-responsive-web-design/applied-accessibility/improve-accessibility-of-audio-content-with-the-audio-element.english.md index a234e6ff5c..5479dd1ef8 100644 --- a/curriculum/challenges/english/01-responsive-web-design/applied-accessibility/improve-accessibility-of-audio-content-with-the-audio-element.english.md +++ b/curriculum/challenges/english/01-responsive-web-design/applied-accessibility/improve-accessibility-of-audio-content-with-the-audio-element.english.md @@ -26,19 +26,19 @@ Time to take a break from Camper Cat and meet fellow camper Zersiax (@zersiax), ```yml tests: - text: Your code should have one audio tag. - testString: 'assert($("audio").length === 1, "Your code should have one audio tag.");' + testString: assert($('audio').length === 1, 'Your code should have one audio tag.'); - text: Make sure your audio element has a closing tag. - testString: 'assert(code.match(/<\/audio>/g).length === 1 && code.match(/[\s\S]*<\/audio>/g), "Make sure your audio element has a closing tag.");' + testString: assert(code.match(/<\/audio>/g).length === 1 && code.match(/[\s\S]*<\/audio>/g), 'Make sure your audio element has a closing tag.'); - text: The audio tag should have the controls attribute. - testString: 'assert($("audio").attr("controls"), "The audio tag should have the controls attribute.");' + testString: assert($('audio').attr('controls'), 'The audio tag should have the controls attribute.'); - text: Your code should have one source tag. - testString: 'assert($("source").length === 1, "Your code should have one source tag.");' + testString: assert($('source').length === 1, 'Your code should have one source tag.'); - text: Your source tag should be inside the audio tags. - testString: 'assert($("audio").children("source").length === 1, "Your source tag should be inside the audio tags.");' + testString: assert($('audio').children('source').length === 1, 'Your source tag should be inside the audio tags.'); - text: The value for the src attribute on the source tag should match the link in the instructions exactly. - testString: 'assert($("source").attr("src") === "https://s3.amazonaws.com/freecodecamp/screen-reader.mp3", "The value for the src attribute on the source tag should match the link in the instructions exactly.");' + testString: assert($('source').attr('src') === 'https://s3.amazonaws.com/freecodecamp/screen-reader.mp3', 'The value for the src attribute on the source tag should match the link in the instructions exactly.'); - text: Your code should include a type attribute on the source tag with a value of audio/mpeg. - testString: 'assert($("source").attr("type") === "audio/mpeg", "Your code should include a type attribute on the source tag with a value of audio/mpeg.");' + testString: assert($('source').attr('type') === 'audio/mpeg', 'Your code should include a type attribute on the source tag with a value of audio/mpeg.'); ``` diff --git a/curriculum/challenges/english/01-responsive-web-design/applied-accessibility/improve-chart-accessibility-with-the-figure-element.english.md b/curriculum/challenges/english/01-responsive-web-design/applied-accessibility/improve-chart-accessibility-with-the-figure-element.english.md index 08200b9341..cc318cdec6 100644 --- a/curriculum/challenges/english/01-responsive-web-design/applied-accessibility/improve-chart-accessibility-with-the-figure-element.english.md +++ b/curriculum/challenges/english/01-responsive-web-design/applied-accessibility/improve-chart-accessibility-with-the-figure-element.english.md @@ -24,17 +24,17 @@ Camper Cat is hard at work creating a stacked bar chart showing the amount of ti ```yml tests: - text: Your code should have one figure tag. - testString: 'assert($("figure").length == 1, "Your code should have one figure tag.");' + testString: assert($('figure').length == 1, 'Your code should have one figure tag.'); - text: Your code should have one figcaption tag. - testString: 'assert($("figcaption").length == 1, "Your code should have one figcaption tag.");' + testString: assert($('figcaption').length == 1, 'Your code should have one figcaption tag.'); - text: Your code should not have any div tags. - testString: 'assert($("div").length == 0, "Your code should not have any div tags.");' + testString: assert($('div').length == 0, 'Your code should not have any div tags.'); - text: Your code should not have any p tags. - testString: 'assert($("p").length == 0, "Your code should not have any p tags.");' + testString: assert($('p').length == 0, 'Your code should not have any p tags.'); - text: The figcaption should be a child of the figure tag. - testString: 'assert($("figure").children("figcaption").length == 1, "The figcaption should be a child of the figure tag.");' + testString: assert($('figure').children('figcaption').length == 1, 'The figcaption should be a child of the figure tag.'); - text: Make sure your figure element has a closing tag. - testString: 'assert(code.match(/<\/figure>/g) && code.match(/<\/figure>/g).length === code.match(/
/g).length, "Make sure your figure element has a closing tag.");' + testString: assert(code.match(/<\/figure>/g) && code.match(/<\/figure>/g).length === code.match(/
/g).length, 'Make sure your figure element has a closing tag.'); ``` diff --git a/curriculum/challenges/english/01-responsive-web-design/applied-accessibility/improve-form-field-accessibility-with-the-label-element.english.md b/curriculum/challenges/english/01-responsive-web-design/applied-accessibility/improve-form-field-accessibility-with-the-label-element.english.md index 747b79f382..eb26834c02 100644 --- a/curriculum/challenges/english/01-responsive-web-design/applied-accessibility/improve-form-field-accessibility-with-the-label-element.english.md +++ b/curriculum/challenges/english/01-responsive-web-design/applied-accessibility/improve-form-field-accessibility-with-the-label-element.english.md @@ -25,9 +25,9 @@ Camper Cat expects a lot of interest in his thoughtful blog posts, and wants to ```yml tests: - text: Your code should have a for attribute on the label tag that is not empty. - testString: 'assert($("label").attr("for"), "Your code should have a for attribute on the label tag that is not empty.");' + testString: assert($('label').attr('for'), 'Your code should have a for attribute on the label tag that is not empty.'); - text: Your for attribute value should match the id value on the email input. - testString: 'assert($("label").attr("for") == "email", "Your for attribute value should match the id value on the email input.");' + testString: assert($('label').attr('for') == 'email', 'Your for attribute value should match the id value on the email input.'); ``` diff --git a/curriculum/challenges/english/01-responsive-web-design/applied-accessibility/improve-readability-with-high-contrast-text.english.md b/curriculum/challenges/english/01-responsive-web-design/applied-accessibility/improve-readability-with-high-contrast-text.english.md index 959d21a11c..d980d37df5 100644 --- a/curriculum/challenges/english/01-responsive-web-design/applied-accessibility/improve-readability-with-high-contrast-text.english.md +++ b/curriculum/challenges/english/01-responsive-web-design/applied-accessibility/improve-readability-with-high-contrast-text.english.md @@ -22,9 +22,9 @@ Camper Cat's choice of light gray text on a white background for his recent blog ```yml tests: - text: Your code should change the text color for the body to the darker gray. - testString: 'assert($("body").css("color") == "rgb(99, 99, 99)", "Your code should change the text color for the body to the darker gray.");' + testString: assert($('body').css('color') == 'rgb(99, 99, 99)', 'Your code should change the text color for the body to the darker gray.'); - text: Your code should not change the background-color for the body. - testString: 'assert($("body").css("background-color") == "rgb(255, 255, 255)", "Your code should not change the background-color for the body.");' + testString: assert($('body').css('background-color') == 'rgb(255, 255, 255)', 'Your code should not change the background-color for the body.'); ``` diff --git a/curriculum/challenges/english/01-responsive-web-design/applied-accessibility/jump-straight-to-the-content-using-the-main-element.english.md b/curriculum/challenges/english/01-responsive-web-design/applied-accessibility/jump-straight-to-the-content-using-the-main-element.english.md index 5251438082..07591d8c87 100644 --- a/curriculum/challenges/english/01-responsive-web-design/applied-accessibility/jump-straight-to-the-content-using-the-main-element.english.md +++ b/curriculum/challenges/english/01-responsive-web-design/applied-accessibility/jump-straight-to-the-content-using-the-main-element.english.md @@ -24,9 +24,9 @@ Camper Cat has some big ideas for his ninja weapons page. Help him set up his ma ```yml tests: - text: Your code should have one main tag. - testString: 'assert($("main").length == 1, "Your code should have one main tag.");' + testString: assert($('main').length == 1, 'Your code should have one main tag.'); - text: The main tags should be between the closing header tag and the opening footer tag. - testString: 'assert(code.match(/<\/header>\s*?
\s*?<\/main>/gi), "The main tags should be between the closing header tag and the opening footer tag.");' + testString: assert(code.match(/<\/header>\s*?
\s*?<\/main>/gi), 'The main tags should be between the closing header tag and the opening footer tag.'); ``` diff --git a/curriculum/challenges/english/01-responsive-web-design/applied-accessibility/know-when-alt-text-should-be-left-blank.english.md b/curriculum/challenges/english/01-responsive-web-design/applied-accessibility/know-when-alt-text-should-be-left-blank.english.md index 173de4642d..f1b52a8d34 100644 --- a/curriculum/challenges/english/01-responsive-web-design/applied-accessibility/know-when-alt-text-should-be-left-blank.english.md +++ b/curriculum/challenges/english/01-responsive-web-design/applied-accessibility/know-when-alt-text-should-be-left-blank.english.md @@ -25,9 +25,9 @@ Camper Cat has coded a skeleton page for the blog part of his website. He's plan ```yml tests: - text: Your img tag should have an alt attribute. - testString: 'assert(!($("img").attr("alt") == undefined), "Your img tag should have an alt attribute.");' + testString: assert(!($('img').attr('alt') == undefined), 'Your img tag should have an alt attribute.'); - text: The alt attribute should be set to an empty string. - testString: 'assert($("img").attr("alt") == "", "The alt attribute should be set to an empty string.");' + testString: assert($('img').attr('alt') == '', 'The alt attribute should be set to an empty string.'); ``` diff --git a/curriculum/challenges/english/01-responsive-web-design/applied-accessibility/make-elements-only-visible-to-a-screen-reader-by-using-custom-css.english.md b/curriculum/challenges/english/01-responsive-web-design/applied-accessibility/make-elements-only-visible-to-a-screen-reader-by-using-custom-css.english.md index 8f67b0c4c7..624a188e02 100644 --- a/curriculum/challenges/english/01-responsive-web-design/applied-accessibility/make-elements-only-visible-to-a-screen-reader-by-using-custom-css.english.md +++ b/curriculum/challenges/english/01-responsive-web-design/applied-accessibility/make-elements-only-visible-to-a-screen-reader-by-using-custom-css.english.md @@ -29,13 +29,13 @@ Camper Cat created a really cool stacked bar chart for his training page, and pu ```yml tests: - text: Your code should set the position property of the sr-only class to a value of absolute. - testString: 'assert($(".sr-only").css("position") == "absolute", "Your code should set the position property of the sr-only class to a value of absolute.");' + testString: assert($('.sr-only').css('position') == 'absolute', 'Your code should set the position property of the sr-only class to a value of absolute.'); - text: Your code should set the left property of the sr-only class to a value of -10000px. - testString: 'assert($(".sr-only").css("left") == "-10000px", "Your code should set the left property of the sr-only class to a value of -10000px.");' + testString: assert($('.sr-only').css('left') == '-10000px', 'Your code should set the left property of the sr-only class to a value of -10000px.'); - text: Your code should set the width property of the sr-only class to a value of 1 pixel. - testString: 'assert(code.match(/width:\s*?1px/gi), "Your code should set the width property of the sr-only class to a value of 1 pixel.");' + testString: assert(code.match(/width:\s*?1px/gi), 'Your code should set the width property of the sr-only class to a value of 1 pixel.'); - text: Your code should set the height property of the sr-only class to a value of 1 pixel. - testString: 'assert(code.match(/height:\s*?1px/gi), "Your code should set the height property of the sr-only class to a value of 1 pixel.");' + testString: assert(code.match(/height:\s*?1px/gi), 'Your code should set the height property of the sr-only class to a value of 1 pixel.'); ``` diff --git a/curriculum/challenges/english/01-responsive-web-design/applied-accessibility/make-links-navigatable-with-html-access-keys.english.md b/curriculum/challenges/english/01-responsive-web-design/applied-accessibility/make-links-navigatable-with-html-access-keys.english.md index 120cda2cea..6dbf310a28 100644 --- a/curriculum/challenges/english/01-responsive-web-design/applied-accessibility/make-links-navigatable-with-html-access-keys.english.md +++ b/curriculum/challenges/english/01-responsive-web-design/applied-accessibility/make-links-navigatable-with-html-access-keys.english.md @@ -24,13 +24,13 @@ Camper Cat wants the links around the two blog article titles to have keyboard s ```yml tests: - text: Your code should add an accesskey attribute to the a tag with the id of "first". - testString: 'assert($("#first").attr("accesskey"), "Your code should add an accesskey attribute to the a tag with the id of "first".");' + testString: assert($('#first').attr('accesskey'), 'Your code should add an accesskey attribute to the a tag with the id of "first".'); - text: Your code should add an accesskey attribute to the a tag with the id of "second". - testString: 'assert($("#second").attr("accesskey"), "Your code should add an accesskey attribute to the a tag with the id of "second".");' + testString: assert($('#second').attr('accesskey'), 'Your code should add an accesskey attribute to the a tag with the id of "second".'); - text: Your code should set the accesskey attribute on the a tag with the id of "first" to "g". Note that case matters. - testString: 'assert($("#first").attr("accesskey") == "g", "Your code should set the accesskey attribute on the a tag with the id of "first" to "g". Note that case matters.");' + testString: assert($('#first').attr('accesskey') == 'g', 'Your code should set the accesskey attribute on the a tag with the id of "first" to "g". Note that case matters.'); - text: Your code should set the accesskey attribute on the a tag with the id of "second" to "c". Note that case matters. - testString: 'assert($("#second").attr("accesskey") == "c", "Your code should set the accesskey attribute on the a tag with the id of "second" to "c". Note that case matters.");' + testString: assert($('#second').attr('accesskey') == 'c', 'Your code should set the accesskey attribute on the a tag with the id of "second" to "c". Note that case matters.'); ``` diff --git a/curriculum/challenges/english/01-responsive-web-design/applied-accessibility/make-screen-reader-navigation-easier-with-the-footer-landmark.english.md b/curriculum/challenges/english/01-responsive-web-design/applied-accessibility/make-screen-reader-navigation-easier-with-the-footer-landmark.english.md index 48cdc6d434..fd4548762d 100644 --- a/curriculum/challenges/english/01-responsive-web-design/applied-accessibility/make-screen-reader-navigation-easier-with-the-footer-landmark.english.md +++ b/curriculum/challenges/english/01-responsive-web-design/applied-accessibility/make-screen-reader-navigation-easier-with-the-footer-landmark.english.md @@ -21,11 +21,11 @@ Camper Cat's training page is making good progress. Change the div ```yml tests: - text: Your code should have one footer tag. - testString: 'assert($("footer").length == 1, "Your code should have one footer tag.");' + testString: assert($('footer').length == 1, 'Your code should have one footer tag.'); - text: Your code should not have any div tags. - testString: 'assert($("div").length == 0, "Your code should not have any div tags.");' + testString: assert($('div').length == 0, 'Your code should not have any div tags.'); - text: Your code should have an opening and closing footer tag. - testString: 'assert(code.match(/