From 781eba5c6868dc9ca0ae58ce788809fc74ef3b79 Mon Sep 17 00:00:00 2001 From: kelvinyy <87255139+kelvinyy@users.noreply.github.com> Date: Fri, 5 Aug 2022 18:19:39 +0800 Subject: [PATCH] Fix/update cat photo app bug of not checking type attribute (#47152) * fix the issue not checking type attribute * bug fix for not checking type attribute * fix the bug of not checking type attribute * Update 5ef9b03c81a63668521804de.md update hints * Update 5ef9b03c81a63668521804df.md update hint * Update 5f1a80975fc4bcae0edb3497.md update hint * Update 5f1a80975fc4bcae0edb3497.md * Update 5ef9b03c81a63668521804df.md * Update 5f1a80975fc4bcae0edb3497.md * Update 5f1a80975fc4bcae0edb3497.md * Update 5ef9b03c81a63668521804de.md * Update curriculum/challenges/english/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/5f1a80975fc4bcae0edb3497.md Co-authored-by: Muhammed Mustafa * Update curriculum/challenges/english/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/5f1a80975fc4bcae0edb3497.md Co-authored-by: Muhammed Mustafa * Update curriculum/challenges/english/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/5f1a80975fc4bcae0edb3497.md Co-authored-by: Muhammed Mustafa * Update curriculum/challenges/english/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/5f1a80975fc4bcae0edb3497.md Co-authored-by: Muhammed Mustafa * Update curriculum/challenges/english/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/5ef9b03c81a63668521804de.md Co-authored-by: Muhammed Mustafa * Update curriculum/challenges/english/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/5ef9b03c81a63668521804de.md Co-authored-by: Muhammed Mustafa * added space to step 45 * removed space from step 48 Co-authored-by: Muhammed Mustafa --- .../5ef9b03c81a63668521804de.md | 7 +++++++ .../5ef9b03c81a63668521804df.md | 6 ++++++ .../5f1a80975fc4bcae0edb3497.md | 7 +++++++ 3 files changed, 20 insertions(+) diff --git a/curriculum/challenges/english/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/5ef9b03c81a63668521804de.md b/curriculum/challenges/english/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/5ef9b03c81a63668521804de.md index ec264414c61..fab7ed8d219 100644 --- a/curriculum/challenges/english/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/5ef9b03c81a63668521804de.md +++ b/curriculum/challenges/english/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/5ef9b03c81a63668521804de.md @@ -32,6 +32,13 @@ const radioButtons = [...document.querySelectorAll('input[type="radio"]')]; assert(radioButtons.every((btn) => btn.hasAttribute('name'))); ``` +Both radio buttons should have a `type` attribute. Check that there is a space after the opening tag's name and/or there are spaces before all attribute names. + +```js +const radioButtons = [...document.querySelectorAll('input')]; +assert(radioButtons.every((btn) => btn.hasAttribute('type'))); +``` + Both radio buttons should have a `name` attribute with the value `indoor-outdoor`. You have either omitted the value or have a typo. Remember that attribute values should be surrounded with quotation marks. ```js diff --git a/curriculum/challenges/english/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/5ef9b03c81a63668521804df.md b/curriculum/challenges/english/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/5ef9b03c81a63668521804df.md index f580ae1725c..3ceb752707b 100644 --- a/curriculum/challenges/english/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/5ef9b03c81a63668521804df.md +++ b/curriculum/challenges/english/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/5ef9b03c81a63668521804df.md @@ -28,6 +28,12 @@ Your radio button should have an `id` attribute. Check that there is a space aft assert($('input')[0].hasAttribute('id')); ``` +Your radio button should have a `type` attribute. Check that there is a space after the opening tag's name and/or there are spaces before all attribute names. + +```js +assert($('input')[0].hasAttribute('type')); +``` + Your radio button should have an `id` attribute with the value `indoor`. You have either omitted the value or have a typo. Remember that attribute values should be surrounded with quotation marks. ```js diff --git a/curriculum/challenges/english/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/5f1a80975fc4bcae0edb3497.md b/curriculum/challenges/english/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/5f1a80975fc4bcae0edb3497.md index d78f60d765e..fa7b9beb9bf 100644 --- a/curriculum/challenges/english/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/5f1a80975fc4bcae0edb3497.md +++ b/curriculum/challenges/english/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/5f1a80975fc4bcae0edb3497.md @@ -32,6 +32,13 @@ const radioButtons = [...document.querySelectorAll('input[type="radio"]')]; assert(radioButtons.every((btn) => btn.hasAttribute('value'))); ``` +Both radio buttons should have a `type` attribute. Check that there is a space after the opening tag's name and/or there are spaces before all attribute names. + +```js +const radioButtons = [...document.querySelectorAll('input')]; +assert(radioButtons.every((btn) => btn.hasAttribute('type'))); +``` + The `Indoor` radio button's `value` attribute should be set to `indoor`. You have either omitted the value or have a typo. Remember that attribute values should be surrounded with quotation marks. ```js