chore(i18n,learn): processed translations (#51787)

This commit is contained in:
camperbot
2023-10-03 13:18:25 -07:00
committed by GitHub
parent 3d2746cdcf
commit 5b7e58b2fa
665 changed files with 3614 additions and 3284 deletions

View File

@@ -1,6 +1,6 @@
---
id: 60eebd07ea685b0e777b5583
title: Step 1
title: الخطوة 1
challengeType: 0
dashedName: step-1
---

View File

@@ -1,6 +1,6 @@
---
id: 60f027099a15b00485563dd2
title: Step 2
title: الخطوة 2
challengeType: 0
dashedName: step-2
---

View File

@@ -1,6 +1,6 @@
---
id: 60f027c87bc98f050395c139
title: Step 3
title: الخطوة 3
challengeType: 0
dashedName: step-3
---

View File

@@ -1,6 +1,6 @@
---
id: 60f0286404aefb0562a4fdf9
title: Step 4
title: الخطوة 4
challengeType: 0
dashedName: step-4
---

View File

@@ -1,6 +1,6 @@
---
id: 60f02e7361b68405e27b62a5
title: Step 6
title: الخطوة 6
challengeType: 0
dashedName: step-6
---

View File

@@ -1,6 +1,6 @@
---
id: 60f030d388cb74067cf291c3
title: Step 7
title: الخطوة 7
challengeType: 0
dashedName: step-7
---

View File

@@ -1,6 +1,6 @@
---
id: 60f1922fcbd2410527b3bd89
title: Step 8
title: الخطوة 8
challengeType: 0
dashedName: step-8
---

View File

@@ -1,6 +1,6 @@
---
id: 60f1a5e2d2c23707a4f9a660
title: Step 9
title: الخطوة 9
challengeType: 0
dashedName: step-9
---

View File

@@ -1,6 +1,6 @@
---
id: 60f1a9cbd23023082e149fee
title: Step 10
title: الخطوة 10
challengeType: 0
dashedName: step-10
---

View File

@@ -1,6 +1,6 @@
---
id: 60f5c3e399ff1a05629964e4
title: Step 11
title: الخطوة 11
challengeType: 0
dashedName: step-11
---

View File

@@ -1,6 +1,6 @@
---
id: 60f5cb8875ab6a0610f05071
title: Step 13
title: الخطوة 13
challengeType: 0
dashedName: step-13
---

View File

@@ -1,6 +1,6 @@
---
id: 60f5d2776c854e069560fbe6
title: Step 14
title: الخطوة 14
challengeType: 0
dashedName: step-14
---

View File

@@ -1,6 +1,6 @@
---
id: 60f5dc35c07ac1078f140916
title: Step 15
title: الخطوة 15
challengeType: 0
dashedName: step-15
---

View File

@@ -1,6 +1,6 @@
---
id: 60f803d5241e6a0433a523a1
title: Step 16
title: الخطوة 16
challengeType: 0
dashedName: step-16
---

View File

@@ -1,6 +1,6 @@
---
id: 60f805f813eaf2049bc2ceea
title: Step 17
title: الخطوة 17
challengeType: 0
dashedName: step-17
---

View File

@@ -1,6 +1,6 @@
---
id: 60f80e0081e0f2052ae5b505
title: Step 19
title: الخطوة 19
challengeType: 0
dashedName: step-19
---

View File

@@ -1,6 +1,6 @@
---
id: 60f81167d0d4910809f88945
title: Step 20
title: الخطوة 20
challengeType: 0
dashedName: step-20
---

View File

@@ -1,6 +1,6 @@
---
id: 60f81616cff80508badf9ad5
title: Step 21
title: الخطوة 21
challengeType: 0
dashedName: step-21
---

View File

@@ -1,6 +1,6 @@
---
id: 60f83e7bfc09900959f41e20
title: Step 22
title: الخطوة 22
challengeType: 0
dashedName: step-22
---

View File

@@ -1,6 +1,6 @@
---
id: 60f84ec41116b209c280ba91
title: Step 23
title: الخطوة 23
challengeType: 0
dashedName: step-23
---

View File

@@ -1,28 +1,28 @@
---
id: 60f852f645b5310a8264f555
title: Step 24
title: الخطوة 24
challengeType: 0
dashedName: step-24
---
# --description--
فلنذهب إلى الجزء التالي من نموذج التسجيل. سيطلب هذا القسم نوع الحساب الذي يفتحه المستخدم، وسيؤكد أن المستخدم قد قرأ الأحكام والشروط.
فلنذهب إلى الجزء التالي من نموذج التسجيل. This section will ask for the type of account the user is opening.
ابدأ بإضافة ثلاثة عناصر `label` إلى الـ `fieldset` الثاني.
Start by adding two `label` elements to the second `fieldset`.
# --hints--
يجب عليك إضافة ثلاثة عناصر `label` إلى الـ `fieldset` الثاني.
You should add two `label` elements to the second `fieldset`.
```js
assert.equal(document.querySelectorAll('fieldset')?.[1]?.querySelectorAll('label')?.length, 3);
assert.equal(document.querySelectorAll('fieldset')?.[1]?.querySelectorAll('label')?.length, 2);
```
عناصر `label` يجب أن تكون siblings اي تحت parent واحد و علي نفس المستوي.
```js
assert.exists(document.querySelector('fieldset:nth-child(2)')?.querySelector('label + label + label'));
assert.exists(document.querySelector('fieldset:nth-child(2)')?.querySelector('label + label'));
```
# --seed--

View File

@@ -1,13 +1,13 @@
---
id: 60f85a62fb30c80bcea0cedb
title: Step 25
title: الخطوة 25
challengeType: 0
dashedName: step-25
---
# --description--
سيتم السماح للمستخدمين باختيار `Personal Account` أو `Business Account`.
Users will be allowed to choose either a `Personal` or `Business`.
للقيام بذلك، ضمن كل عنصر من أول عنصرين `label`، أضف عنصر `input` واحد مع `type="radio"`.
@@ -58,7 +58,6 @@ assert.equal(document.querySelectorAll('fieldset:nth-child(2) input[type="radio"
<fieldset>
<label></label>
<label></label>
<label></label>
</fieldset>
--fcc-editable-region--
<fieldset></fieldset>

View File

@@ -1,32 +1,43 @@
---
id: 60f8604682407e0d017bbf7f
title: Step 26
title: الخطوة 26
challengeType: 0
dashedName: step-26
---
# --description--
بالنسبة للأحكام والشروط، أضف `input` فيه `type` يساوي `checkbox` إلى عنصر `label` الثالث. اجعل هذا العنصر `input` مطلوبا `required` لأن المستخدمين لا ينبغي أن يسجلوا الدخول دون قراءة الأحكام والشروط.
Within each corresponding `label` element, and immediately after the `input` element, add a space and add the following text:
```md
Personal
Business
```
# --hints--
يجب عليك إضافة `input` إلى عنصر `label` الثالث.
You should give the first `label` the text `Personal`.
```js
assert.exists(document.querySelector('fieldset:nth-child(2) label:nth-child(3) input'));
assert.include(document.querySelector('fieldset:nth-child(2) > label')?.innerText, 'Personal');
```
يجب عليك إضافة سمة `type` بالقيمة `checkbox` إلى عنصر `input`.
You should give the second `label` the text `Business`.
```js
assert.equal(document.querySelector('fieldset:nth-child(2) label:nth-child(3) input')?.type, 'checkbox');
assert.include(document.querySelector('fieldset:nth-child(2) > label:nth-child(2)')?.innerText, 'Business');
```
يجب عليك إضافة سمة `required` إلى عنصر `input`.
You should give the first `label` text one space at the front.
```js
assert.equal(document.querySelector('fieldset:nth-child(2) label:nth-child(3) input')?.required, true);
assert.equal(document.querySelector('fieldset:nth-child(2) > label')?.innerText?.[0], ' ');
```
You should give the second `label` text one space at the front.
```js
assert.equal(document.querySelector('fieldset:nth-child(2) > label:nth-child(2)')?.innerText?.[0], ' ');
```
# --seed--
@@ -51,13 +62,12 @@ assert.equal(document.querySelector('fieldset:nth-child(2) label:nth-child(3) in
<label for="email">Enter Your Email: <input id="email" type="email" required /></label>
<label for="new-password">Create a New Password: <input id="new-password" type="password" pattern="[a-z0-5]{8,}" required /></label>
</fieldset>
--fcc-editable-region--
<fieldset>
<label><input type="radio" /></label>
<label><input type="radio" /></label>
<label></label>
</fieldset>
--fcc-editable-region--
<label><input type="radio" /></label>
<label><input type="radio" /></label>
--fcc-editable-region--
</fieldset>
<fieldset></fieldset>
<input type="submit" value="Submit" />
</form>

View File

@@ -1,56 +1,28 @@
---
id: 60f8618d191b940d62038513
title: Step 27
title: الخطوة 27
challengeType: 0
dashedName: step-27
---
# --description--
ضمن كل عنصر من عناصر `label` المقابلة، وبعد عنصر `input` مباشرة، أضف مساحة وأضف النص التالي:
You only want one radio input to be selectable at a time. However, the form does not know the radio inputs are related.
```md
Personal Account
Business Account
I accept the terms and conditions
```
To relate the radio inputs, give them the same `name` attribute with a value of `account-type`. Now, it is not possible to select both radio inputs at the same time.
# --hints--
يجب عليك إعطاء أول `label` النص `Personal Account`.
You should give the first radio input the `name` attribute with a value of `account-type`.
```js
assert.include(document.querySelector('fieldset:nth-child(2) > label')?.innerText, 'Personal Account');
assert.equal(document.querySelector('fieldset:nth-child(2) label:nth-child(1) input[type="radio"]')?.name, 'account-type');
```
يجب عليك إعطاء ثاني `label` النص `Business Account`.
You should give the second radio input the `name` attribute with a value of `account-type`.
```js
assert.include(document.querySelector('fieldset:nth-child(2) > label:nth-child(2)')?.innerText, 'Business Account');
```
يجب عليك إعطاء ثالث `label` النص `I accept the terms and conditions`.
```js
assert.include(document.querySelector('fieldset:nth-child(2) > label:nth-child(3)')?.innerText, 'I accept the terms and conditions');
```
يجب أن تعطي أول نص `label` مسافة واحدة في المقدمة.
```js
assert.equal(document.querySelector('fieldset:nth-child(2) > label')?.innerText?.[0], ' ');
```
يجب أن تعطي ثاني نص `label` مسافة واحدة في المقدمة.
```js
assert.equal(document.querySelector('fieldset:nth-child(2) > label:nth-child(2)')?.innerText?.[0], ' ');
```
يجب أن تعطي ثالث نص `label` مسافة واحدة في المقدمة.
```js
assert.equal(document.querySelector('fieldset:nth-child(2) > label:nth-child(3)')?.innerText?.[0], ' ');
assert.equal(document.querySelector('fieldset:nth-child(2) label:nth-child(2) input[type="radio"]')?.name, 'account-type');
```
# --seed--
@@ -77,9 +49,8 @@ assert.equal(document.querySelector('fieldset:nth-child(2) > label:nth-child(3)'
</fieldset>
--fcc-editable-region--
<fieldset>
<label><input type="radio" /></label>
<label><input type="radio" /></label>
<label><input type="checkbox" required /></label>
<label><input type="radio" /> Personal</label>
<label><input type="radio" /> Business</label>
</fieldset>
--fcc-editable-region--
<fieldset></fieldset>

View File

@@ -1,34 +1,40 @@
---
id: 60fab4a123ce4b04526b082b
title: Step 28
title: الخطوة 28
challengeType: 0
dashedName: step-28
---
# --description--
تريد فقط radio input واحد قابل للاختيار في كل مرة. ومع ذلك ، فإن النموذج لا يعرف أن مدخلات الراديو (radio inputs) مرتبطة.
Currently when someone submit the form, they can submit it without checking the radio inputs. Although you had used `required` attribute to indicate the the input is required previously, this can't work in this case, because adding required to both inputs, will convey the wrong information to the form users.
لربط مدخلات الراديو، قم بإعطائهم نفس سمة `name` بقيمة `account-type`. الآن، لا يمكن تحديد كلا مدخلات الراديو في نفس الوقت.
To solve this, you can provide context of what is needed by adding `legend` element below the second `fieldset` with text `Account type (required)`, then add `checked` attribute to the `Personal` input to make sure that the form is submitted with the required data in it.
# --hints--
يجب أن تعطي أول مدخل راديو السمة `name` بقيمة `account-type`.
Your `input` elements should remain `type` of `radio`.
```js
assert.equal(document.querySelector('fieldset:nth-child(2) label:nth-child(1) input[type="radio"]')?.name, 'account-type');
assert.equal(document.querySelectorAll('fieldset:nth-child(2) input[type="radio"]')?.length, 2);
```
يجب أن تعطي مدخل الراديوي الثاني سمة `name` بقيمة `account-type`.
You should add a `legend` element within the second `fieldset` element.
```js
assert.equal(document.querySelector('fieldset:nth-child(2) label:nth-child(2) input[type="radio"]')?.name, 'account-type');
assert.equal(document.querySelectorAll('fieldset:nth-of-type(2) > legend')?.length, 1);
```
لا يجب أن تعطي `checkbox` السمة `name`.
You should add `Account type (required)` text to the `legend` element.
```js
assert.isEmpty(document.querySelector('fieldset:nth-child(2) label:nth-child(3) input[type="checkbox"]')?.name);
assert.equal(document.querySelector('fieldset:nth-of-type(2) > legend')?.textContent, 'Account type (required)');
```
You should give an attribute of `checked` to the `Personal` input.
```js
assert.isTrue(document.querySelector('fieldset:nth-child(2) input[type="radio"]')?.hasAttribute('checked'));
```
# --seed--
@@ -55,9 +61,9 @@ assert.isEmpty(document.querySelector('fieldset:nth-child(2) label:nth-child(3)
</fieldset>
--fcc-editable-region--
<fieldset>
<label><input type="radio" /> Personal Account</label>
<label><input type="radio" /> Business Account</label>
<label><input type="checkbox" required /> I accept the terms and conditions</label>
<label><input type="radio" name="account-type" /> Personal</label>
<label><input type="radio" name="account-type" /> Business</label>
</fieldset>
--fcc-editable-region--
<fieldset></fieldset>

View File

@@ -7,7 +7,7 @@ dashedName: step-31
# --description--
لإكمال هذا الـ `fieldset`، اربط النص `terms and conditions` في الـ `label` الثالث إلى الموقع التالي:
Add `I accept the terms and conditions` text to the newly added label, then link the text `terms and conditions` to the following location:
```md
https://www.freecodecamp.org/news/terms-of-service/
@@ -15,22 +15,28 @@ https://www.freecodecamp.org/news/terms-of-service/
# --hints--
يجب عليك استخدام عنصر `a` للربط بالأحكام والشروط.
You should add `I accept the terms and conditions` text to the label following the third fieldset.
```js
assert.exists(document.querySelector('fieldset:nth-child(2) > label:nth-child(3) > input + a'));
assert.equal(document.querySelector('fieldset:nth-child(3) + label')?.innerText.trim(), 'I accept the terms and conditions');
```
يجب عليك إعطاء عنصر `a` سمة `href` من `https://www.freecodecamp.org/news/terms-of-service/`.
You should use an `a` element to link to the terms and conditions.
```js
assert.match(document.querySelector('fieldset:nth-child(2) > label:nth-child(3) > input + a')?.href, /https:\/\/www\.freecodecamp\.org\/news\/terms-of-service\/?/);
assert.exists(document.querySelector('fieldset:nth-child(3) + label > input + a'));
```
يجب عليك فقط تغليف عنصر `a` حول النص `terms and conditions`.
You should give the `a` element an `href` of `https://www.freecodecamp.org/news/terms-of-service/`.
```js
assert.equal(document.querySelector('fieldset:nth-child(2) > label:nth-child(3) > input + a')?.textContent, 'terms and conditions');
assert.match(document.querySelector('fieldset:nth-child(3) + label > input + a')?.href, /https:\/\/www\.freecodecamp\.org\/news\/terms-of-service\/?/);
```
You should only wrap the `a` element around the text `terms and conditions`.
```js
assert.equal(document.querySelector('fieldset:nth-child(3) + label > input + a')?.textContent, 'terms and conditions');
```
# --seed--
@@ -55,14 +61,15 @@ assert.equal(document.querySelector('fieldset:nth-child(2) > label:nth-child(3)
<label for="email">Enter Your Email: <input id="email" type="email" required /></label>
<label for="new-password">Create a New Password: <input id="new-password" type="password" pattern="[a-z0-5]{8,}" required /></label>
</fieldset>
--fcc-editable-region--
<fieldset>
<label for="personal-account"><input id="personal-account" type="radio" name="account-type" /> Personal Account</label>
<label for="business-account"><input id="business-account" type="radio" name="account-type" /> Business Account</label>
<label for="terms-and-conditions"><input id="terms-and-conditions" type="checkbox" required /> I accept the terms and conditions</label>
<legend>Account type (required)</legend>
<label for="personal-account"><input id="personal-account" type="radio" name="account-type" checked /> Personal</label>
<label for="business-account"><input id="business-account" type="radio" name="account-type" /> Business</label>
</fieldset>
--fcc-editable-region--
<fieldset></fieldset>
--fcc-editable-region--
<label for="terms-and-conditions"><input id="terms-and-conditions" type="checkbox" required /></label>
--fcc-editable-region--
<input type="submit" value="Submit" />
</form>
</body>

View File

@@ -54,17 +54,18 @@ assert.equal(document.querySelector('fieldset:nth-child(3) > label > input')?.ty
<label for="new-password">Create a New Password: <input id="new-password" type="password" pattern="[a-z0-5]{8,}" required /></label>
</fieldset>
<fieldset>
<label for="personal-account"><input id="personal-account" type="radio" name="account-type" /> Personal Account</label>
<label for="business-account"><input id="business-account" type="radio" name="account-type" /> Business Account</label>
<label for="terms-and-conditions">
<input id="terms-and-conditions" type="checkbox" required /> I accept the <a href="https://www.freecodecamp.org/news/terms-of-service/">terms and conditions</a>
</label>
<legend>Account type (required)</legend>
<label for="personal-account"><input id="personal-account" type="radio" name="account-type" checked /> Personal</label>
<label for="business-account"><input id="business-account" type="radio" name="account-type" /> Business</label>
</fieldset>
--fcc-editable-region--
<fieldset>
</fieldset>
--fcc-editable-region--
<label for="terms-and-conditions">
<input id="terms-and-conditions" type="checkbox" required /> I accept the <a href="https://www.freecodecamp.org/news/terms-of-service/">terms and conditions</a>
</label>
<input type="submit" value="Submit" />
</form>
</body>

View File

@@ -68,11 +68,9 @@ assert.equal(document.querySelector('fieldset:nth-child(3) > label:nth-child(2)
<label for="new-password">Create a New Password: <input id="new-password" type="password" pattern="[a-z0-5]{8,}" required /></label>
</fieldset>
<fieldset>
<label for="personal-account"><input id="personal-account" type="radio" name="account-type" /> Personal Account</label>
<label for="business-account"><input id="business-account" type="radio" name="account-type" /> Business Account</label>
<label for="terms-and-conditions">
<input id="terms-and-conditions" type="checkbox" required /> I accept the <a href="https://www.freecodecamp.org/news/terms-of-service/">terms and conditions</a>
</label>
<legend>Account type (required)</legend>
<label for="personal-account"><input id="personal-account" type="radio" name="account-type" checked /> Personal</label>
<label for="business-account"><input id="business-account" type="radio" name="account-type" /> Business</label>
</fieldset>
--fcc-editable-region--
<fieldset>
@@ -80,6 +78,9 @@ assert.equal(document.querySelector('fieldset:nth-child(3) > label:nth-child(2)
</fieldset>
--fcc-editable-region--
<label for="terms-and-conditions">
<input id="terms-and-conditions" type="checkbox" required /> I accept the <a href="https://www.freecodecamp.org/news/terms-of-service/">terms and conditions</a>
</label>
<input type="submit" value="Submit" />
</form>
</body>

View File

@@ -48,11 +48,9 @@ assert.equal(document.querySelectorAll('fieldset:nth-child(3) > select > option'
<label for="new-password">Create a New Password: <input id="new-password" type="password" pattern="[a-z0-5]{8,}" required /></label>
</fieldset>
<fieldset>
<label for="personal-account"><input id="personal-account" type="radio" name="account-type" /> Personal Account</label>
<label for="business-account"><input id="business-account" type="radio" name="account-type" /> Business Account</label>
<label for="terms-and-conditions">
<input id="terms-and-conditions" type="checkbox" required /> I accept the <a href="https://www.freecodecamp.org/news/terms-of-service/">terms and conditions</a>
</label>
<legend>Account type (required)</legend>
<label for="personal-account"><input id="personal-account" type="radio" name="account-type" checked /> Personal</label>
<label for="business-account"><input id="business-account" type="radio" name="account-type" /> Business</label>
</fieldset>
--fcc-editable-region--
<fieldset>
@@ -61,6 +59,9 @@ assert.equal(document.querySelectorAll('fieldset:nth-child(3) > select > option'
</fieldset>
--fcc-editable-region--
<label for="terms-and-conditions">
<input id="terms-and-conditions" type="checkbox" required /> I accept the <a href="https://www.freecodecamp.org/news/terms-of-service/">terms and conditions</a>
</label>
<input type="submit" value="Submit" />
</form>
</body>

View File

@@ -58,11 +58,9 @@ assert.equal(document.querySelectorAll('fieldset > label > select > option')?.le
<label for="new-password">Create a New Password: <input id="new-password" type="password" pattern="[a-z0-5]{8,}" required /></label>
</fieldset>
<fieldset>
<label for="personal-account"><input id="personal-account" type="radio" name="account-type" /> Personal Account</label>
<label for="business-account"><input id="business-account" type="radio" name="account-type" /> Business Account</label>
<label for="terms-and-conditions">
<input id="terms-and-conditions" type="checkbox" required /> I accept the <a href="https://www.freecodecamp.org/news/terms-of-service/">terms and conditions</a>
</label>
<legend>Account type (required)</legend>
<label for="personal-account"><input id="personal-account" type="radio" name="account-type" checked /> Personal</label>
<label for="business-account"><input id="business-account" type="radio" name="account-type" /> Business</label>
</fieldset>
--fcc-editable-region--
<fieldset>
@@ -77,6 +75,9 @@ assert.equal(document.querySelectorAll('fieldset > label > select > option')?.le
</select>
</fieldset>
--fcc-editable-region--
<label for="terms-and-conditions">
<input id="terms-and-conditions" type="checkbox" required /> I accept the <a href="https://www.freecodecamp.org/news/terms-of-service/">terms and conditions</a>
</label>
<input type="submit" value="Submit" />
</form>
</body>

View File

@@ -72,11 +72,9 @@ assert.equal(document.querySelectorAll('fieldset:nth-child(3) > label:nth-child(
<label for="new-password">Create a New Password: <input id="new-password" type="password" pattern="[a-z0-5]{8,}" required /></label>
</fieldset>
<fieldset>
<label for="personal-account"><input id="personal-account" type="radio" name="account-type" /> Personal Account</label>
<label for="business-account"><input id="business-account" type="radio" name="account-type" /> Business Account</label>
<label for="terms-and-conditions">
<input id="terms-and-conditions" type="checkbox" required /> I accept the <a href="https://www.freecodecamp.org/news/terms-of-service/">terms and conditions</a>
</label>
<legend>Account type (required)</legend>
<label for="personal-account"><input id="personal-account" type="radio" name="account-type" checked /> Personal</label>
<label for="business-account"><input id="business-account" type="radio" name="account-type" /> Business</label>
</fieldset>
--fcc-editable-region--
<fieldset>
@@ -93,6 +91,9 @@ assert.equal(document.querySelectorAll('fieldset:nth-child(3) > label:nth-child(
</label>
</fieldset>
--fcc-editable-region--
<label for="terms-and-conditions">
<input id="terms-and-conditions" type="checkbox" required /> I accept the <a href="https://www.freecodecamp.org/news/terms-of-service/">terms and conditions</a>
</label>
<input type="submit" value="Submit" />
</form>
</body>

View File

@@ -66,11 +66,9 @@ assert.equal(document.querySelectorAll('fieldset:nth-child(3) > label:nth-child(
<label for="new-password">Create a New Password: <input id="new-password" type="password" pattern="[a-z0-5]{8,}" required /></label>
</fieldset>
<fieldset>
<label for="personal-account"><input id="personal-account" type="radio" name="account-type" /> Personal Account</label>
<label for="business-account"><input id="business-account" type="radio" name="account-type" /> Business Account</label>
<label for="terms-and-conditions">
<input id="terms-and-conditions" type="checkbox" required /> I accept the <a href="https://www.freecodecamp.org/news/terms-of-service/">terms and conditions</a>
</label>
<legend>Account type (required)</legend>
<label for="personal-account"><input id="personal-account" type="radio" name="account-type" checked/> Personal</label>
<label for="business-account"><input id="business-account" type="radio" name="account-type" /> Business</label>
</fieldset>
--fcc-editable-region--
<fieldset>
@@ -87,6 +85,9 @@ assert.equal(document.querySelectorAll('fieldset:nth-child(3) > label:nth-child(
</label>
</fieldset>
--fcc-editable-region--
<label for="terms-and-conditions">
<input id="terms-and-conditions" type="checkbox" required /> I accept the <a href="https://www.freecodecamp.org/news/terms-of-service/">terms and conditions</a>
</label>
<input type="submit" value="Submit" />
</form>
</body>

View File

@@ -60,11 +60,9 @@ assert.match(code, /<textarea\s*>[\s\S]*<\/textarea\s*>/);
<label for="new-password">Create a New Password: <input id="new-password" type="password" pattern="[a-z0-5]{8,}" required /></label>
</fieldset>
<fieldset>
<label for="personal-account"><input id="personal-account" type="radio" name="account-type" /> Personal Account</label>
<label for="business-account"><input id="business-account" type="radio" name="account-type" /> Business Account</label>
<label for="terms-and-conditions">
<input id="terms-and-conditions" type="checkbox" required /> I accept the <a href="https://www.freecodecamp.org/news/terms-of-service/">terms and conditions</a>
</label>
<legend>Account type (required)</legend>
<label for="personal-account"><input id="personal-account" type="radio" name="account-type" checked /> Personal</label>
<label for="business-account"><input id="business-account" type="radio" name="account-type" /> Business</label>
</fieldset>
--fcc-editable-region--
<fieldset>
@@ -82,6 +80,9 @@ assert.match(code, /<textarea\s*>[\s\S]*<\/textarea\s*>/);
</fieldset>
--fcc-editable-region--
<label for="terms-and-conditions">
<input id="terms-and-conditions" type="checkbox" required /> I accept the <a href="https://www.freecodecamp.org/news/terms-of-service/">terms and conditions</a>
</label>
<input type="submit" value="Submit" />
</form>
</body>

View File

@@ -48,11 +48,9 @@ assert.equal(document.querySelector('fieldset:nth-child(3) > label:nth-child(4)
<label for="new-password">Create a New Password: <input id="new-password" type="password" pattern="[a-z0-5]{8,}" required /></label>
</fieldset>
<fieldset>
<label for="personal-account"><input id="personal-account" type="radio" name="account-type" /> Personal Account</label>
<label for="business-account"><input id="business-account" type="radio" name="account-type" /> Business Account</label>
<label for="terms-and-conditions">
<input id="terms-and-conditions" type="checkbox" required /> I accept the <a href="https://www.freecodecamp.org/news/terms-of-service/">terms and conditions</a>
</label>
<legend>Account type (required)</legend>
<label for="personal-account"><input id="personal-account" type="radio" name="account-type" checked /> Personal</label>
<label for="business-account"><input id="business-account" type="radio" name="account-type" /> Business</label>
</fieldset>
--fcc-editable-region--
<fieldset>
@@ -72,6 +70,9 @@ assert.equal(document.querySelector('fieldset:nth-child(3) > label:nth-child(4)
</label>
</fieldset>
--fcc-editable-region--
<label for="terms-and-conditions">
<input id="terms-and-conditions" type="checkbox" required /> I accept the <a href="https://www.freecodecamp.org/news/terms-of-service/">terms and conditions</a>
</label>
<input type="submit" value="Submit" />
</form>
</body>

View File

@@ -48,11 +48,9 @@ assert.match(document.querySelector('fieldset:nth-child(3) > label:nth-child(4)
<label for="new-password">Create a New Password: <input id="new-password" type="password" pattern="[a-z0-5]{8,}" required /></label>
</fieldset>
<fieldset>
<label for="personal-account"><input id="personal-account" type="radio" name="account-type" /> Personal Account</label>
<label for="business-account"><input id="business-account" type="radio" name="account-type" /> Business Account</label>
<label for="terms-and-conditions">
<input id="terms-and-conditions" type="checkbox" required /> I accept the <a href="https://www.freecodecamp.org/news/terms-of-service/">terms and conditions</a>
</label>
<legend>Account type (required)</legend>
<label for="personal-account"><input id="personal-account" type="radio" name="account-type" checked /> Personal</label>
<label for="business-account"><input id="business-account" type="radio" name="account-type" /> Business</label>
</fieldset>
--fcc-editable-region--
<fieldset>
@@ -72,6 +70,9 @@ assert.match(document.querySelector('fieldset:nth-child(3) > label:nth-child(4)
</label>
</fieldset>
--fcc-editable-region--
<label for="terms-and-conditions">
<input id="terms-and-conditions" type="checkbox" required /> I accept the <a href="https://www.freecodecamp.org/news/terms-of-service/">terms and conditions</a>
</label>
<input type="submit" value="Submit" />
</form>
</body>

View File

@@ -109,11 +109,9 @@ assert.isNotEmpty(document.querySelector('textarea')?.name);
<label for="new-password">Create a New Password: <input id="new-password" type="password" pattern="[a-z0-5]{8,}" required /></label>
</fieldset>
<fieldset>
<label for="personal-account"><input id="personal-account" type="radio" name="account-type" /> Personal Account</label>
<label for="business-account"><input id="business-account" type="radio" name="account-type" /> Business Account</label>
<label for="terms-and-conditions">
<input id="terms-and-conditions" type="checkbox" required /> I accept the <a href="https://www.freecodecamp.org/news/terms-of-service/">terms and conditions</a>
</label>
<legend>Account type (required)</legend>
<label for="personal-account"><input id="personal-account" type="radio" name="account-type" checked /> Personal</label>
<label for="business-account"><input id="business-account" type="radio" name="account-type" /> Business</label>
</fieldset>
<fieldset>
<label for="profile-picture">Upload a profile picture: <input id="profile-picture" type="file"/></label>
@@ -131,7 +129,10 @@ assert.isNotEmpty(document.querySelector('textarea')?.name);
<textarea id ="bio" rows="3" cols="30" placeholder="I like coding on the beach..."></textarea>
</label>
</fieldset>
--fcc-editable-region--
<label for="terms-and-conditions">
<input id="terms-and-conditions" type="checkbox" required /> I accept the <a href="https://www.freecodecamp.org/news/terms-of-service/">terms and conditions</a>
</label>
--fcc-editable-region--
<input type="submit" value="Submit" />
</form>
</body>

View File

@@ -54,11 +54,9 @@ assert.equal(new __helpers.CSSHelp(document).getStyle('body')?.fontSize, '16px')
<label for="new-password">Create a New Password: <input id="new-password" name="new-password" type="password" pattern="[a-z0-5]{8,}" required /></label>
</fieldset>
<fieldset>
<label for="personal-account"><input id="personal-account" type="radio" name="account-type" /> Personal Account</label>
<label for="business-account"><input id="business-account" type="radio" name="account-type" /> Business Account</label>
<label for="terms-and-conditions">
<input id="terms-and-conditions" type="checkbox" required name="terms-and-conditions" /> I accept the <a href="https://www.freecodecamp.org/news/terms-of-service/">terms and conditions</a>
</label>
<legend>Account type (required)</legend>
<label for="personal-account"><input id="personal-account" type="radio" name="account-type" checked /> Personal</label>
<label for="business-account"><input id="business-account" type="radio" name="account-type" /> Business</label>
</fieldset>
<fieldset>
<label for="profile-picture">Upload a profile picture: <input id="profile-picture" type="file" name="file" /></label>
@@ -76,6 +74,9 @@ assert.equal(new __helpers.CSSHelp(document).getStyle('body')?.fontSize, '16px')
<textarea id="bio" name="bio" rows="3" cols="30" placeholder="I like coding on the beach..."></textarea>
</label>
</fieldset>
<label for="terms-and-conditions">
<input id="terms-and-conditions" type="checkbox" required name="terms-and-conditions" /> I accept the <a href="https://www.freecodecamp.org/news/terms-of-service/">terms and conditions</a>
</label>
<input type="submit" value="Submit" />
</form>
</body>

View File

@@ -52,11 +52,9 @@ assert.equal(new __helpers.CSSHelp(document).getStyle('h1, p')?.textAlign, 'cent
<label for="new-password">Create a New Password: <input id="new-password" name="new-password" type="password" pattern="[a-z0-5]{8,}" required /></label>
</fieldset>
<fieldset>
<label for="personal-account"><input id="personal-account" type="radio" name="account-type" /> Personal Account</label>
<label for="business-account"><input id="business-account" type="radio" name="account-type" /> Business Account</label>
<label for="terms-and-conditions">
<input id="terms-and-conditions" type="checkbox" required name="terms-and-conditions" /> I accept the <a href="https://www.freecodecamp.org/news/terms-of-service/">terms and conditions</a>
</label>
<legend>Account type (required)</legend>
<label for="personal-account"><input id="personal-account" type="radio" name="account-type" checked /> Personal</label>
<label for="business-account"><input id="business-account" type="radio" name="account-type" /> Business</label>
</fieldset>
<fieldset>
<label for="profile-picture">Upload a profile picture: <input id="profile-picture" type="file" name="file" /></label>
@@ -74,6 +72,9 @@ assert.equal(new __helpers.CSSHelp(document).getStyle('h1, p')?.textAlign, 'cent
<textarea id="bio" name="bio" rows="3" cols="30" placeholder="I like coding on the beach..."></textarea>
</label>
</fieldset>
<label for="terms-and-conditions">
<input id="terms-and-conditions" type="checkbox" required name="terms-and-conditions" /> I accept the <a href="https://www.freecodecamp.org/news/terms-of-service/">terms and conditions</a>
</label>
<input type="submit" value="Submit" />
</form>
</body>

View File

@@ -64,11 +64,9 @@ assert.equal(new __helpers.CSSHelp(document).getStyle('form')?.width, '60vw');
<label for="new-password">Create a New Password: <input id="new-password" name="new-password" type="password" pattern="[a-z0-5]{8,}" required /></label>
</fieldset>
<fieldset>
<label for="personal-account"><input id="personal-account" type="radio" name="account-type" /> Personal Account</label>
<label for="business-account"><input id="business-account" type="radio" name="account-type" /> Business Account</label>
<label for="terms-and-conditions">
<input id="terms-and-conditions" type="checkbox" required name="terms-and-conditions" /> I accept the <a href="https://www.freecodecamp.org/news/terms-of-service/">terms and conditions</a>
</label>
<legend>Account type (required)</legend>
<label for="personal-account"><input id="personal-account" type="radio" name="account-type" checked /> Personal</label>
<label for="business-account"><input id="business-account" type="radio" name="account-type" /> Business</label>
</fieldset>
<fieldset>
<label for="profile-picture">Upload a profile picture: <input id="profile-picture" type="file" name="file" /></label>
@@ -86,6 +84,9 @@ assert.equal(new __helpers.CSSHelp(document).getStyle('form')?.width, '60vw');
<textarea id="bio" name="bio" rows="3" cols="30" placeholder="I like coding on the beach..."></textarea>
</label>
</fieldset>
<label for="terms-and-conditions">
<input id="terms-and-conditions" type="checkbox" required name="terms-and-conditions" /> I accept the <a href="https://www.freecodecamp.org/news/terms-of-service/">terms and conditions</a>
</label>
<input type="submit" value="Submit" />
</form>
</body>

View File

@@ -58,11 +58,9 @@ assert.equal(fieldset?.paddingRight, '0px');
<label for="new-password">Create a New Password: <input id="new-password" name="new-password" type="password" pattern="[a-z0-5]{8,}" required /></label>
</fieldset>
<fieldset>
<label for="personal-account"><input id="personal-account" type="radio" name="account-type" /> Personal Account</label>
<label for="business-account"><input id="business-account" type="radio" name="account-type" /> Business Account</label>
<label for="terms-and-conditions">
<input id="terms-and-conditions" type="checkbox" required name="terms-and-conditions" /> I accept the <a href="https://www.freecodecamp.org/news/terms-of-service/">terms and conditions</a>
</label>
<legend>Account type (required)</legend>
<label for="personal-account"><input id="personal-account" type="radio" name="account-type" checked /> Personal</label>
<label for="business-account"><input id="business-account" type="radio" name="account-type" /> Business</label>
</fieldset>
<fieldset>
<label for="profile-picture">Upload a profile picture: <input id="profile-picture" type="file" name="file" /></label>
@@ -80,6 +78,9 @@ assert.equal(fieldset?.paddingRight, '0px');
<textarea id="bio" name="bio" rows="3" cols="30" placeholder="I like coding on the beach..."></textarea>
</label>
</fieldset>
<label for="terms-and-conditions">
<input id="terms-and-conditions" type="checkbox" required name="terms-and-conditions" /> I accept the <a href="https://www.freecodecamp.org/news/terms-of-service/">terms and conditions</a>
</label>
<input type="submit" value="Submit" />
</form>
</body>

View File

@@ -40,11 +40,9 @@ assert.equal(new __helpers.CSSHelp(document).getStyle('fieldset')?.borderBottom,
<label for="new-password">Create a New Password: <input id="new-password" name="new-password" type="password" pattern="[a-z0-5]{8,}" required /></label>
</fieldset>
<fieldset>
<label for="personal-account"><input id="personal-account" type="radio" name="account-type" /> Personal Account</label>
<label for="business-account"><input id="business-account" type="radio" name="account-type" /> Business Account</label>
<label for="terms-and-conditions">
<input id="terms-and-conditions" type="checkbox" required name="terms-and-conditions" /> I accept the <a href="https://www.freecodecamp.org/news/terms-of-service/">terms and conditions</a>
</label>
<legend>Account type (required)</legend>
<label for="personal-account"><input id="personal-account" type="radio" name="account-type" checked /> Personal</label>
<label for="business-account"><input id="business-account" type="radio" name="account-type" /> Business</label>
</fieldset>
<fieldset>
<label for="profile-picture">Upload a profile picture: <input id="profile-picture" type="file" name="file" /></label>
@@ -62,6 +60,9 @@ assert.equal(new __helpers.CSSHelp(document).getStyle('fieldset')?.borderBottom,
<textarea id="bio" name="bio" rows="3" cols="30" placeholder="I like coding on the beach..."></textarea>
</label>
</fieldset>
<label for="terms-and-conditions">
<input id="terms-and-conditions" type="checkbox" required name="terms-and-conditions" /> I accept the <a href="https://www.freecodecamp.org/news/terms-of-service/">terms and conditions</a>
</label>
<input type="submit" value="Submit" />
</form>
</body>

View File

@@ -79,11 +79,9 @@ assert.equal(selFunc(['input, textarea, select', 'input, select, textarea', 'sel
<label for="new-password">Create a New Password: <input id="new-password" name="new-password" type="password" pattern="[a-z0-5]{8,}" required /></label>
</fieldset>
<fieldset>
<label for="personal-account"><input id="personal-account" type="radio" name="account-type" /> Personal Account</label>
<label for="business-account"><input id="business-account" type="radio" name="account-type" /> Business Account</label>
<label for="terms-and-conditions">
<input id="terms-and-conditions" type="checkbox" required name="terms-and-conditions" /> I accept the <a href="https://www.freecodecamp.org/news/terms-of-service/">terms and conditions</a>
</label>
<legend>Account type (required)</legend>
<label for="personal-account"><input id="personal-account" type="radio" name="account-type" checked /> Personal</label>
<label for="business-account"><input id="business-account" type="radio" name="account-type" /> Business</label>
</fieldset>
<fieldset>
<label for="profile-picture">Upload a profile picture: <input id="profile-picture" type="file" name="file" /></label>
@@ -101,6 +99,9 @@ assert.equal(selFunc(['input, textarea, select', 'input, select, textarea', 'sel
<textarea id="bio" name="bio" rows="3" cols="30" placeholder="I like coding on the beach..."></textarea>
</label>
</fieldset>
<label for="terms-and-conditions">
<input id="terms-and-conditions" type="checkbox" required name="terms-and-conditions" /> I accept the <a href="https://www.freecodecamp.org/news/terms-of-service/">terms and conditions</a>
</label>
<input type="submit" value="Submit" />
</form>
</body>

View File

@@ -25,12 +25,6 @@ assert(document.querySelectorAll('fieldset:nth-child(2) input')?.[0]?.classList?
assert(document.querySelectorAll('fieldset:nth-child(2) input')?.[1]?.classList?.contains('inline'));
```
يجب عليك إعطاء ثالث `input` الـ class بقيمة `inline`.
```js
assert(document.querySelectorAll('fieldset:nth-child(2) input')?.[2]?.classList?.contains('inline'));
```
# --seed--
## --seed-contents--
@@ -55,11 +49,9 @@ assert(document.querySelectorAll('fieldset:nth-child(2) input')?.[2]?.classList?
</fieldset>
--fcc-editable-region--
<fieldset>
<label for="personal-account"><input id="personal-account" type="radio" name="account-type" /> Personal Account</label>
<label for="business-account"><input id="business-account" type="radio" name="account-type" /> Business Account</label>
<label for="terms-and-conditions">
<input id="terms-and-conditions" type="checkbox" required name="terms-and-conditions" /> I accept the <a href="https://www.freecodecamp.org/news/terms-of-service/">terms and conditions</a>
</label>
<legend>Account type (required)</legend>
<label for="personal-account"><input id="personal-account" type="radio" name="account-type" checked /> Personal</label>
<label for="business-account"><input id="business-account" type="radio" name="account-type" /> Business</label>
</fieldset>
--fcc-editable-region--
<fieldset>
@@ -78,6 +70,9 @@ assert(document.querySelectorAll('fieldset:nth-child(2) input')?.[2]?.classList?
<textarea id="bio" name="bio" rows="3" cols="30" placeholder="I like coding on the beach..."></textarea>
</label>
</fieldset>
<label for="terms-and-conditions">
<input id="terms-and-conditions" type="checkbox" required name="terms-and-conditions" /> I accept the <a href="https://www.freecodecamp.org/news/terms-of-service/">terms and conditions</a>
</label>
<input type="submit" value="Submit" />
</form>
</body>

View File

@@ -46,11 +46,9 @@ assert.equal(new __helpers.CSSHelp(document).getStyle('.inline')?.width, 'unset'
<label for="new-password">Create a New Password: <input id="new-password" name="new-password" type="password" pattern="[a-z0-5]{8,}" required /></label>
</fieldset>
<fieldset>
<label for="personal-account"><input id="personal-account" type="radio" name="account-type" class="inline" /> Personal Account</label>
<label for="business-account"><input id="business-account" type="radio" name="account-type" class="inline" /> Business Account</label>
<label for="terms-and-conditions">
<input id="terms-and-conditions" type="checkbox" required name="terms-and-conditions" class="inline" /> I accept the <a href="https://www.freecodecamp.org/news/terms-of-service/">terms and conditions</a>
</label>
<legend>Account type (required)</legend>
<label for="personal-account"><input id="personal-account" type="radio" name="account-type" class="inline" checked /> Personal</label>
<label for="business-account"><input id="business-account" type="radio" name="account-type" class="inline" /> Business</label>
</fieldset>
<fieldset>
<label for="profile-picture">Upload a profile picture: <input id="profile-picture" type="file" name="file" /></label>
@@ -68,6 +66,9 @@ assert.equal(new __helpers.CSSHelp(document).getStyle('.inline')?.width, 'unset'
<textarea id="bio" name="bio" rows="3" cols="30" placeholder="I like coding on the beach..."></textarea>
</label>
</fieldset>
<label for="terms-and-conditions">
<input id="terms-and-conditions" type="checkbox" required name="terms-and-conditions" /> I accept the <a href="https://www.freecodecamp.org/news/terms-of-service/">terms and conditions</a>
</label>
<input type="submit" value="Submit" />
</form>
</body>

View File

@@ -58,11 +58,9 @@ assert.equal(new __helpers.CSSHelp(document).getStyle('.inline')?.marginLeft, '0
<label for="new-password">Create a New Password: <input id="new-password" name="new-password" type="password" pattern="[a-z0-5]{8,}" required /></label>
</fieldset>
<fieldset>
<label for="personal-account"><input id="personal-account" type="radio" name="account-type" class="inline" /> Personal Account</label>
<label for="business-account"><input id="business-account" type="radio" name="account-type" class="inline" /> Business Account</label>
<label for="terms-and-conditions">
<input id="terms-and-conditions" type="checkbox" required name="terms-and-conditions" class="inline" /> I accept the <a href="https://www.freecodecamp.org/news/terms-of-service/">terms and conditions</a>
</label>
<legend>Account type (required)</legend>
<label for="personal-account"><input id="personal-account" type="radio" name="account-type" class="inline" checked /> Personal</label>
<label for="business-account"><input id="business-account" type="radio" name="account-type" class="inline" /> Business</label>
</fieldset>
<fieldset>
<label for="profile-picture">Upload a profile picture: <input id="profile-picture" type="file" name="file" /></label>
@@ -80,6 +78,9 @@ assert.equal(new __helpers.CSSHelp(document).getStyle('.inline')?.marginLeft, '0
<textarea id="bio" name="bio" rows="3" cols="30" placeholder="I like coding on the beach..."></textarea>
</label>
</fieldset>
<label for="terms-and-conditions">
<input id="terms-and-conditions" type="checkbox" required name="terms-and-conditions" /> I accept the <a href="https://www.freecodecamp.org/news/terms-of-service/">terms and conditions</a>
</label>
<input type="submit" value="Submit" />
</form>
</body>

View File

@@ -42,11 +42,9 @@ assert.equal(new __helpers.CSSHelp(document).getStyle('.inline')?.verticalAlign,
<label for="new-password">Create a New Password: <input id="new-password" name="new-password" type="password" pattern="[a-z0-5]{8,}" required /></label>
</fieldset>
<fieldset>
<label for="personal-account"><input id="personal-account" type="radio" name="account-type" class="inline" /> Personal Account</label>
<label for="business-account"><input id="business-account" type="radio" name="account-type" class="inline" /> Business Account</label>
<label for="terms-and-conditions">
<input id="terms-and-conditions" type="checkbox" required name="terms-and-conditions" class="inline" /> I accept the <a href="https://www.freecodecamp.org/news/terms-of-service/">terms and conditions</a>
</label>
<legend>Account type (required)</legend>
<label for="personal-account"><input id="personal-account" type="radio" name="account-type" class="inline" checked /> Personal</label>
<label for="business-account"><input id="business-account" type="radio" name="account-type" class="inline" /> Business</label>
</fieldset>
<fieldset>
<label for="profile-picture">Upload a profile picture: <input id="profile-picture" type="file" name="file" /></label>
@@ -64,6 +62,9 @@ assert.equal(new __helpers.CSSHelp(document).getStyle('.inline')?.verticalAlign,
<textarea id="bio" name="bio" rows="3" cols="30" placeholder="I like coding on the beach..."></textarea>
</label>
</fieldset>
<label for="terms-and-conditions">
<input id="terms-and-conditions" type="checkbox" required name="terms-and-conditions" /> I accept the <a href="https://www.freecodecamp.org/news/terms-of-service/">terms and conditions</a>
</label>
<input type="submit" value="Submit" />
</form>
</body>

View File

@@ -57,11 +57,9 @@ assert.equal(selFunc(['input, textarea', 'textarea, input'].find(selFunc))?.bord
<label for="new-password">Create a New Password: <input id="new-password" name="new-password" type="password" pattern="[a-z0-5]{8,}" required /></label>
</fieldset>
<fieldset>
<label for="personal-account"><input id="personal-account" type="radio" name="account-type" class="inline" /> Personal Account</label>
<label for="business-account"><input id="business-account" type="radio" name="account-type" class="inline" /> Business Account</label>
<label for="terms-and-conditions">
<input id="terms-and-conditions" type="checkbox" required name="terms-and-conditions" class="inline" /> I accept the <a href="https://www.freecodecamp.org/news/terms-of-service/">terms and conditions</a>
</label>
<legend>Account type (required)</legend>
<label for="personal-account"><input id="personal-account" type="radio" name="account-type" class="inline" checked /> Personal</label>
<label for="business-account"><input id="business-account" type="radio" name="account-type" class="inline" /> Business</label>
</fieldset>
<fieldset>
<label for="profile-picture">Upload a profile picture: <input id="profile-picture" type="file" name="file" /></label>
@@ -79,6 +77,9 @@ assert.equal(selFunc(['input, textarea', 'textarea, input'].find(selFunc))?.bord
<textarea id="bio" name="bio" rows="3" cols="30" placeholder="I like coding on the beach..."></textarea>
</label>
</fieldset>
<label for="terms-and-conditions">
<input id="terms-and-conditions" type="checkbox" required name="terms-and-conditions" /> I accept the <a href="https://www.freecodecamp.org/news/terms-of-service/">terms and conditions</a>
</label>
<input type="submit" value="Submit" />
</form>
</body>

View File

@@ -50,11 +50,9 @@ assert.equal(selFunc(['input, textarea', 'textarea, input'].find(selFunc))?.minH
<label for="new-password">Create a New Password: <input id="new-password" name="new-password" type="password" pattern="[a-z0-5]{8,}" required /></label>
</fieldset>
<fieldset>
<label for="personal-account"><input id="personal-account" type="radio" name="account-type" class="inline" /> Personal Account</label>
<label for="business-account"><input id="business-account" type="radio" name="account-type" class="inline" /> Business Account</label>
<label for="terms-and-conditions">
<input id="terms-and-conditions" type="checkbox" required name="terms-and-conditions" class="inline" /> I accept the <a href="https://www.freecodecamp.org/news/terms-of-service/">terms and conditions</a>
</label>
<legend>Account type (required)</legend>
<label for="personal-account"><input id="personal-account" type="radio" name="account-type" class="inline" checked /> Personal</label>
<label for="business-account"><input id="business-account" type="radio" name="account-type" class="inline" /> Business</label>
</fieldset>
<fieldset>
<label for="profile-picture">Upload a profile picture: <input id="profile-picture" type="file" name="file" /></label>
@@ -72,6 +70,9 @@ assert.equal(selFunc(['input, textarea', 'textarea, input'].find(selFunc))?.minH
<textarea id="bio" name="bio" rows="3" cols="30" placeholder="I like coding on the beach..."></textarea>
</label>
</fieldset>
<label for="terms-and-conditions">
<input id="terms-and-conditions" type="checkbox" required name="terms-and-conditions" /> I accept the <a href="https://www.freecodecamp.org/news/terms-of-service/">terms and conditions</a>
</label>
<input type="submit" value="Submit" />
</form>
</body>

View File

@@ -54,11 +54,9 @@ assert.isEmpty(new __helpers.CSSHelp(document).getStyle('input, textarea')?.minH
<label for="new-password">Create a New Password: <input id="new-password" name="new-password" type="password" pattern="[a-z0-5]{8,}" required /></label>
</fieldset>
<fieldset>
<label for="personal-account"><input id="personal-account" type="radio" name="account-type" class="inline" /> Personal Account</label>
<label for="business-account"><input id="business-account" type="radio" name="account-type" class="inline" /> Business Account</label>
<label for="terms-and-conditions">
<input id="terms-and-conditions" type="checkbox" required name="terms-and-conditions" class="inline" /> I accept the <a href="https://www.freecodecamp.org/news/terms-of-service/">terms and conditions</a>
</label>
<legend>Account type (required)</legend>
<label for="personal-account"><input id="personal-account" type="radio" name="account-type" class="inline" checked /> Personal</label>
<label for="business-account"><input id="business-account" type="radio" name="account-type" class="inline" /> Business</label>
</fieldset>
<fieldset>
<label for="profile-picture">Upload a profile picture: <input id="profile-picture" type="file" name="file" /></label>
@@ -76,6 +74,9 @@ assert.isEmpty(new __helpers.CSSHelp(document).getStyle('input, textarea')?.minH
<textarea id="bio" name="bio" rows="3" cols="30" placeholder="I like coding on the beach..."></textarea>
</label>
</fieldset>
<label for="terms-and-conditions">
<input id="terms-and-conditions" type="checkbox" required name="terms-and-conditions" /> I accept the <a href="https://www.freecodecamp.org/news/terms-of-service/">terms and conditions</a>
</label>
<input type="submit" value="Submit" />
</form>
</body>

View File

@@ -60,11 +60,9 @@ assert.equal(new __helpers.CSSHelp(document).getStyle('input[type="submit"]')?.w
<label for="new-password">Create a New Password: <input id="new-password" name="new-password" type="password" pattern="[a-z0-5]{8,}" required /></label>
</fieldset>
<fieldset>
<label for="personal-account"><input id="personal-account" type="radio" name="account-type" class="inline" /> Personal Account</label>
<label for="business-account"><input id="business-account" type="radio" name="account-type" class="inline" /> Business Account</label>
<label for="terms-and-conditions">
<input id="terms-and-conditions" type="checkbox" required name="terms-and-conditions" class="inline" /> I accept the <a href="https://www.freecodecamp.org/news/terms-of-service/">terms and conditions</a>
</label>
<legend>Account type (required)</legend>
<label for="personal-account"><input id="personal-account" type="radio" name="account-type" class="inline" checked /> Personal</label>
<label for="business-account"><input id="business-account" type="radio" name="account-type" class="inline" /> Business</label>
</fieldset>
<fieldset>
<label for="profile-picture">Upload a profile picture: <input id="profile-picture" type="file" name="file" /></label>
@@ -82,6 +80,9 @@ assert.equal(new __helpers.CSSHelp(document).getStyle('input[type="submit"]')?.w
<textarea id="bio" name="bio" rows="3" cols="30" placeholder="I like coding on the beach..."></textarea>
</label>
</fieldset>
<label for="terms-and-conditions">
<input id="terms-and-conditions" type="checkbox" required name="terms-and-conditions" /> I accept the <a href="https://www.freecodecamp.org/news/terms-of-service/">terms and conditions</a>
</label>
<input type="submit" value="Submit" />
</form>
</body>

View File

@@ -49,11 +49,9 @@ assert.isEmpty(new __helpers.CSSHelp(document).getStyle('input[type="submit"]')?
<label for="new-password">Create a New Password: <input id="new-password" name="new-password" type="password" pattern="[a-z0-5]{8,}" required /></label>
</fieldset>
<fieldset>
<label for="personal-account"><input id="personal-account" type="radio" name="account-type" class="inline" /> Personal Account</label>
<label for="business-account"><input id="business-account" type="radio" name="account-type" class="inline" /> Business Account</label>
<label for="terms-and-conditions">
<input id="terms-and-conditions" type="checkbox" required name="terms-and-conditions" class="inline" /> I accept the <a href="https://www.freecodecamp.org/news/terms-of-service/">terms and conditions</a>
</label>
<legend>Account type (required)</legend>
<label for="personal-account"><input id="personal-account" type="radio" name="account-type" class="inline" checked /> Personal</label>
<label for="business-account"><input id="business-account" type="radio" name="account-type" class="inline" /> Business</label>
</fieldset>
<fieldset>
<label for="profile-picture">Upload a profile picture: <input id="profile-picture" type="file" name="file" /></label>
@@ -71,6 +69,9 @@ assert.isEmpty(new __helpers.CSSHelp(document).getStyle('input[type="submit"]')?
<textarea id="bio" name="bio" rows="3" cols="30" placeholder="I like coding on the beach..."></textarea>
</label>
</fieldset>
<label for="terms-and-conditions">
<input id="terms-and-conditions" type="checkbox" required name="terms-and-conditions" /> I accept the <a href="https://www.freecodecamp.org/news/terms-of-service/">terms and conditions</a>
</label>
<input type="submit" value="Submit" />
</form>
</body>

View File

@@ -46,11 +46,9 @@ assert.equal(new __helpers.CSSHelp(document).getStyle('input[type="submit"]')?.f
<label for="new-password">Create a New Password: <input id="new-password" name="new-password" type="password" pattern="[a-z0-5]{8,}" required /></label>
</fieldset>
<fieldset>
<label for="personal-account"><input id="personal-account" type="radio" name="account-type" class="inline" /> Personal Account</label>
<label for="business-account"><input id="business-account" type="radio" name="account-type" class="inline" /> Business Account</label>
<label for="terms-and-conditions">
<input id="terms-and-conditions" type="checkbox" required name="terms-and-conditions" class="inline" /> I accept the <a href="https://www.freecodecamp.org/news/terms-of-service/">terms and conditions</a>
</label>
<legend>Account type (required)</legend>
<label for="personal-account"><input id="personal-account" type="radio" name="account-type" class="inline" checked /> Personal</label>
<label for="business-account"><input id="business-account" type="radio" name="account-type" class="inline" /> Business</label>
</fieldset>
<fieldset>
<label for="profile-picture">Upload a profile picture: <input id="profile-picture" type="file" name="file" /></label>
@@ -68,6 +66,9 @@ assert.equal(new __helpers.CSSHelp(document).getStyle('input[type="submit"]')?.f
<textarea id="bio" name="bio" rows="3" cols="30" placeholder="I like coding on the beach..."></textarea>
</label>
</fieldset>
<label for="terms-and-conditions">
<input id="terms-and-conditions" type="checkbox" required name="terms-and-conditions" /> I accept the <a href="https://www.freecodecamp.org/news/terms-of-service/">terms and conditions</a>
</label>
<input type="submit" value="Submit" />
</form>
</body>

View File

@@ -46,11 +46,9 @@ assert.equal(new __helpers.CSSHelp(document).getStyle('input[type="submit"]')?.b
<label for="new-password">Create a New Password: <input id="new-password" name="new-password" type="password" pattern="[a-z0-5]{8,}" required /></label>
</fieldset>
<fieldset>
<label for="personal-account"><input id="personal-account" type="radio" name="account-type" class="inline" /> Personal Account</label>
<label for="business-account"><input id="business-account" type="radio" name="account-type" class="inline" /> Business Account</label>
<label for="terms-and-conditions">
<input id="terms-and-conditions" type="checkbox" required name="terms-and-conditions" class="inline" /> I accept the <a href="https://www.freecodecamp.org/news/terms-of-service/">terms and conditions</a>
</label>
<legend>Account type (required)</legend>
<label for="personal-account"><input id="personal-account" type="radio" name="account-type" class="inline" checked /> Personal</label>
<label for="business-account"><input id="business-account" type="radio" name="account-type" class="inline" /> Business</label>
</fieldset>
<fieldset>
<label for="profile-picture">Upload a profile picture: <input id="profile-picture" type="file" name="file" /></label>
@@ -68,6 +66,9 @@ assert.equal(new __helpers.CSSHelp(document).getStyle('input[type="submit"]')?.b
<textarea id="bio" name="bio" rows="3" cols="30" placeholder="I like coding on the beach..."></textarea>
</label>
</fieldset>
<label for="terms-and-conditions">
<input id="terms-and-conditions" type="checkbox" required name="terms-and-conditions" /> I accept the <a href="https://www.freecodecamp.org/news/terms-of-service/">terms and conditions</a>
</label>
<input type="submit" value="Submit" />
</form>
</body>

View File

@@ -49,11 +49,9 @@ assert.equal(new __helpers.CSSHelp(document).getStyle('input[type="submit"]')?.m
<label for="new-password">Create a New Password: <input id="new-password" name="new-password" type="password" pattern="[a-z0-5]{8,}" required /></label>
</fieldset>
<fieldset>
<label for="personal-account"><input id="personal-account" type="radio" name="account-type" class="inline" /> Personal Account</label>
<label for="business-account"><input id="business-account" type="radio" name="account-type" class="inline" /> Business Account</label>
<label for="terms-and-conditions">
<input id="terms-and-conditions" type="checkbox" required name="terms-and-conditions" class="inline" /> I accept the <a href="https://www.freecodecamp.org/news/terms-of-service/">terms and conditions</a>
</label>
<legend>Account type (required)</legend>
<label for="personal-account"><input id="personal-account" type="radio" name="account-type" class="inline" checked /> Personal</label>
<label for="business-account"><input id="business-account" type="radio" name="account-type" class="inline" /> Business</label>
</fieldset>
<fieldset>
<label for="profile-picture">Upload a profile picture: <input id="profile-picture" type="file" name="file" /></label>
@@ -71,6 +69,9 @@ assert.equal(new __helpers.CSSHelp(document).getStyle('input[type="submit"]')?.m
<textarea id="bio" name="bio" rows="3" cols="30" placeholder="I like coding on the beach..."></textarea>
</label>
</fieldset>
<label for="terms-and-conditions">
<input id="terms-and-conditions" type="checkbox" required name="terms-and-conditions" /> I accept the <a href="https://www.freecodecamp.org/news/terms-of-service/">terms and conditions</a>
</label>
<input type="submit" value="Submit" />
</form>
</body>

View File

@@ -48,11 +48,9 @@ assert.equal(new __helpers.CSSHelp(document).getStyle('input[type="file"]')?.pad
<label for="new-password">Create a New Password: <input id="new-password" name="new-password" type="password" pattern="[a-z0-5]{8,}" required /></label>
</fieldset>
<fieldset>
<label for="personal-account"><input id="personal-account" type="radio" name="account-type" class="inline" /> Personal Account</label>
<label for="business-account"><input id="business-account" type="radio" name="account-type" class="inline" /> Business Account</label>
<label for="terms-and-conditions">
<input id="terms-and-conditions" type="checkbox" required name="terms-and-conditions" class="inline" /> I accept the <a href="https://www.freecodecamp.org/news/terms-of-service/">terms and conditions</a>
</label>
<legend>Account type (required)</legend>
<label for="personal-account"><input id="personal-account" type="radio" name="account-type" class="inline" checked /> Personal</label>
<label for="business-account"><input id="business-account" type="radio" name="account-type" class="inline" /> Business</label>
</fieldset>
<fieldset>
<label for="profile-picture">Upload a profile picture: <input id="profile-picture" type="file" name="file" /></label>
@@ -70,6 +68,9 @@ assert.equal(new __helpers.CSSHelp(document).getStyle('input[type="file"]')?.pad
<textarea id="bio" name="bio" rows="3" cols="30" placeholder="I like coding on the beach..."></textarea>
</label>
</fieldset>
<label for="terms-and-conditions">
<input id="terms-and-conditions" type="checkbox" required name="terms-and-conditions" /> I accept the <a href="https://www.freecodecamp.org/news/terms-of-service/">terms and conditions</a>
</label>
<input type="submit" value="Submit" />
</form>
</body>

View File

@@ -46,11 +46,9 @@ assert.equal(new __helpers.CSSHelp(document).getStyle('form')?.paddingBottom, '2
<label for="new-password">Create a New Password: <input id="new-password" name="new-password" type="password" pattern="[a-z0-5]{8,}" required /></label>
</fieldset>
<fieldset>
<label for="personal-account"><input id="personal-account" type="radio" name="account-type" class="inline" /> Personal Account</label>
<label for="business-account"><input id="business-account" type="radio" name="account-type" class="inline" /> Business Account</label>
<label for="terms-and-conditions">
<input id="terms-and-conditions" type="checkbox" required name="terms-and-conditions" class="inline" /> I accept the <a href="https://www.freecodecamp.org/news/terms-of-service/">terms and conditions</a>
</label>
<legend>Account type (required)</legend>
<label for="personal-account"><input id="personal-account" type="radio" name="account-type" class="inline" checked /> Personal</label>
<label for="business-account"><input id="business-account" type="radio" name="account-type" class="inline" /> Business</label>
</fieldset>
<fieldset>
<label for="profile-picture">Upload a profile picture: <input id="profile-picture" type="file" name="file" /></label>
@@ -68,6 +66,9 @@ assert.equal(new __helpers.CSSHelp(document).getStyle('form')?.paddingBottom, '2
<textarea id="bio" name="bio" rows="3" cols="30" placeholder="I like coding on the beach..."></textarea>
</label>
</fieldset>
<label for="terms-and-conditions">
<input id="terms-and-conditions" type="checkbox" required name="terms-and-conditions" /> I accept the <a href="https://www.freecodecamp.org/news/terms-of-service/">terms and conditions</a>
</label>
<input type="submit" value="Submit" />
</form>
</body>

View File

@@ -7,19 +7,25 @@ dashedName: step-64
# --description--
أخيرا وليس آخرا، قم بتغيير لون النص `terms and conditions` إلى `#dfdfe2`.
Last, but not least, make the `input` for the terms and condition `inline`, then change the text color of the `terms and conditions` link element to `#dfdfe2`.
أحسنت صنعا! لقد أكملت الجزء الأخير من مشروع التدريب _Registration Form_.
# --hints--
يجب عليك استخدام منتقي العناصر `a`.
You should give the `input` a class of `inline`.
```js
assert(document.querySelector('fieldset:nth-child(3) + label > input')?.classList?.contains('inline'));
```
You should use an `a` element selector.
```js
assert.exists(new __helpers.CSSHelp(document).getStyle('a'));
```
يجب عليك إعطاء عناصر `a` الـ `color` بقيمة `#dfdfe2`.
You should give the `a` element a `color` of `#dfdfe2`.
```js
assert.equal(new __helpers.CSSHelp(document).getStyle('a')?.color, 'rgb(223, 223, 226)');
@@ -48,11 +54,9 @@ assert.equal(new __helpers.CSSHelp(document).getStyle('a')?.color, 'rgb(223, 223
<label for="new-password">Create a New Password: <input id="new-password" name="new-password" type="password" pattern="[a-z0-5]{8,}" required /></label>
</fieldset>
<fieldset>
<label for="personal-account"><input id="personal-account" type="radio" name="account-type" class="inline" /> Personal Account</label>
<label for="business-account"><input id="business-account" type="radio" name="account-type" class="inline" /> Business Account</label>
<label for="terms-and-conditions">
<input id="terms-and-conditions" type="checkbox" required name="terms-and-conditions" class="inline" /> I accept the <a href="https://www.freecodecamp.org/news/terms-of-service/">terms and conditions</a>
</label>
<legend>Account type (required)</legend>
<label for="personal-account"><input id="personal-account" type="radio" name="account-type" class="inline" checked /> Personal</label>
<label for="business-account"><input id="business-account" type="radio" name="account-type" class="inline" /> Business</label>
</fieldset>
<fieldset>
<label for="profile-picture">Upload a profile picture: <input id="profile-picture" type="file" name="file" /></label>
@@ -70,6 +74,11 @@ assert.equal(new __helpers.CSSHelp(document).getStyle('a')?.color, 'rgb(223, 223
<textarea id="bio" name="bio" rows="3" cols="30" placeholder="I like coding on the beach..."></textarea>
</label>
</fieldset>
--fcc-editable-region--
<label for="terms-and-conditions">
<input id="terms-and-conditions" type="checkbox" required name="terms-and-conditions" /> I accept the <a href="https://www.freecodecamp.org/news/terms-of-service/">terms and conditions</a>
</label>
--fcc-editable-region--
<input type="submit" value="Submit" />
</form>
</body>
@@ -177,11 +186,9 @@ input[type="file"] {
<label for="new-password">Create a New Password: <input id="new-password" type="password" name="password" pattern="[a-z0-5]{8,}" required /></label>
</fieldset>
<fieldset>
<label for="personal-account"><input id="personal-account" type="radio" name="account-type" class="inline" /> Personal Account</label>
<label for="business-account"><input id="business-account" type="radio" name="account-type" class="inline" /> Business Account</label>
<label for="terms-and-conditions">
<input id="terms-and-conditions" type="checkbox" name="terms" class="inline" required /> I accept the <a href="https://www.freecodecamp.org/news/terms-of-service/">terms and conditions</a>
</label>
<legend>Account type (required)</legend>
<label for="personal-account"><input id="personal-account" type="radio" name="account-type" class="inline" checked /> Personal</label>
<label for="business-account"><input id="business-account" type="radio" name="account-type" class="inline" /> Business</label>
</fieldset>
<fieldset>
<label for="profile-picture">Upload a profile picture: <input id="profile-picture" type="file" name="file" /></label>
@@ -199,6 +206,9 @@ input[type="file"] {
<textarea id="bio" name="bio" rows="3" cols="30" placeholder="I like coding on the beach..."></textarea>
</label>
</fieldset>
<label for="terms-and-conditions">
<input id="terms-and-conditions" type="checkbox" name="terms" class="inline" required /> I accept the <a href="https://www.freecodecamp.org/news/terms-of-service/">terms and conditions</a>
</label>
<input type="submit" value="Submit" />
</form>
</body>

View File

@@ -53,11 +53,9 @@ assert(borderBottom === 'none' || borderBottom === 'medium none' || borderBottom
<label for="new-password">Create a New Password: <input id="new-password" name="new-password" type="password" pattern="[a-z0-5]{8,}" required /></label>
</fieldset>
<fieldset>
<label for="personal-account"><input id="personal-account" type="radio" name="account-type" /> Personal Account</label>
<label for="business-account"><input id="business-account" type="radio" name="account-type" /> Business Account</label>
<label for="terms-and-conditions">
<input id="terms-and-conditions" type="checkbox" required name="terms-and-conditions" /> I accept the <a href="https://www.freecodecamp.org/news/terms-of-service/">terms and conditions</a>
</label>
<legend>Account type (required)</legend>
<label for="personal-account"><input id="personal-account" type="radio" name="account-type" checked /> Personal</label>
<label for="business-account"><input id="business-account" type="radio" name="account-type" /> Business</label>
</fieldset>
<fieldset>
<label for="profile-picture">Upload a profile picture: <input id="profile-picture" type="file" name="file" /></label>
@@ -75,6 +73,9 @@ assert(borderBottom === 'none' || borderBottom === 'medium none' || borderBottom
<textarea id="bio" name="bio" rows="3" cols="30" placeholder="I like coding on the beach..."></textarea>
</label>
</fieldset>
<label for="terms-and-conditions">
<input id="terms-and-conditions" type="checkbox" required name="terms-and-conditions" /> I accept the <a href="https://www.freecodecamp.org/news/terms-of-service/">terms and conditions</a>
</label>
<input type="submit" value="Submit" />
</form>
</body>

View File

@@ -1,6 +1,6 @@
---
id: 62cc5b1779e4d313466f73c5
title: Step 5
title: الخطوة 5
challengeType: 0
dashedName: step-5
---

View File

@@ -1,6 +1,6 @@
---
id: 62ff8b9dab5ac88e4d3d43a3
title: Step 18
title: الخطوة 18
challengeType: 0
dashedName: step-18
---

View File

@@ -7,46 +7,48 @@ dashedName: step-30
# --description--
اتبع أفضل ممارسات تسهيل المنال (accessibility) عن طريق ربط عناصر `input` و `label` في `fieldset` الثاني.
You need to confirm that the user has read the terms and conditions.
استخدم `personal-account`, و `business-account`, و `terms-and-conditions` كقيم لسمات `id`.
Add `label` element after the third `fieldset`, and a `input` element with `type` attribute of `checkbox` inside the newly added `label` element. Make this `input` element `required` because users should not sign up without reading the terms and conditions.
Don't forget to add an `id` attribute of `terms-and-conditions` for accessibility.
# --hints--
يجب أن يحتوي أول عنصر `input` علي `id` بقيمة `personal-account`.
You should add an `label` after the third `fieldset` element.
```js
assert(document.querySelectorAll('fieldset:nth-of-type(2) input')?.[0]?.matches('#personal-account'))
assert.exists(document.querySelector('fieldset:nth-child(3) + label'));
```
يجب أن يحتوي الثاني عنصر `input` علي `id` بقيمة `business-account`.
You should add an `input` to the `label` element.
```js
assert(document.querySelectorAll('fieldset:nth-of-type(2) input')?.[1]?.matches('#business-account'))
assert.exists(document.querySelector('fieldset:nth-child(3) + label > input'));
```
يجب أن يحتوي ثالث عنصر `input` علي `id` بقيمة `terms-and-conditions`.
You should add a `type` attribute of value `checkbox` to the `input` element.
```js
assert(document.querySelectorAll('fieldset:nth-of-type(2) input')?.[2]?.matches('#terms-and-conditions'))
assert.equal(document.querySelector('fieldset:nth-child(3) + label > input')?.type, 'checkbox');
```
يجب أن يحتوي عنصرك الأول `label` على سمة `for` بقيمة `personal-account`.
You should add a `required` attribute to the `input` element.
```js
assert(document.querySelectorAll('fieldset:nth-of-type(2) label')?.[0]?.matches('label[for="personal-account"]'))
assert.equal(document.querySelector('fieldset:nth-child(3) + label > input')?.required, true);
```
يجب أن يحتوي عنصرك الثاتي `label` على سمة `for` بقيمة `business-account`.
The `input` element should have an `id` of `terms-and-conditions`.
```js
assert(document.querySelectorAll('fieldset:nth-of-type(2) label')?.[1]?.matches('label[for="business-account"]'))
assert(document.querySelector('fieldset:nth-child(3) + label > input')?.matches('#terms-and-conditions'))
```
يجب أن يحتوي عنصرك الثالث `label` على سمة `for` بقيمة `terms-and-conditions`.
The `label` element should have a `for` attribute with a value of `terms-and-conditions`.
```js
assert(document.querySelectorAll('fieldset:nth-of-type(2) label')?.[2]?.matches('label[for="terms-and-conditions"]'))
assert(document.querySelector('fieldset:nth-child(3) + label')?.matches('label[for="terms-and-conditions"]'))
```
# --seed--
@@ -71,14 +73,16 @@ assert(document.querySelectorAll('fieldset:nth-of-type(2) label')?.[2]?.matches(
<label for="email">Enter Your Email: <input id="email" type="email" required /></label>
<label for="new-password">Create a New Password: <input id="new-password" type="password" pattern="[a-z0-5]{8,}" required /></label>
</fieldset>
--fcc-editable-region--
<fieldset>
<label><input type="radio" name="account-type" /> Personal Account</label>
<label><input type="radio" name="account-type" /> Business Account</label>
<label><input type="checkbox" required /> I accept the terms and conditions</label>
<legend>Account type (required)</legend>
<label for="personal-account"><input id="personal-account" type="radio" name="account-type" checked /> Personal</label>
<label for="business-account"><input id="business-account" type="radio" name="account-type" /> Business</label>
</fieldset>
--fcc-editable-region--
<fieldset></fieldset>
--fcc-editable-region--
--fcc-editable-region--
<label><input type="checkbox" required /></label>
<input type="submit" value="Submit" />
</form>
</body>

View File

@@ -84,11 +84,9 @@ assert(document.querySelectorAll('fieldset:nth-of-type(3) label')?.[3]?.matches(
<label for="new-password">Create a New Password: <input id="new-password" type="password" pattern="[a-z0-5]{8,}" required /></label>
</fieldset>
<fieldset>
<label for="personal-account"><input id="personal-account" type="radio" name="account-type" /> Personal Account</label>
<label for="business-account"><input id="business-account" type="radio" name="account-type" /> Business Account</label>
<label for="terms-and-conditions">
<input id="terms-and-conditions" type="checkbox" required /> I accept the <a href="https://www.freecodecamp.org/news/terms-of-service/">terms and conditions</a>
</label>
<legend>Account type (required)</legend>
<label for="personal-account"><input id="personal-account" type="radio" name="account-type" checked /> Personal</label>
<label for="business-account"><input id="business-account" type="radio" name="account-type" /> Business</label>
</fieldset>
--fcc-editable-region--
<fieldset>
@@ -108,6 +106,9 @@ assert(document.querySelectorAll('fieldset:nth-of-type(3) label')?.[3]?.matches(
</label>
</fieldset>
--fcc-editable-region--
<label for="terms-and-conditions">
<input id="terms-and-conditions" type="checkbox" required /> I accept the <a href="https://www.freecodecamp.org/news/terms-of-service/">terms and conditions</a>
</label>
<input type="submit" value="Submit" />
</form>
</body>

View File

@@ -1,6 +1,6 @@
---
id: 63541ef4f96cd82e8e6c788a
title: Step 12
title: الخطوة 12
challengeType: 0
dashedName: step-12
---

View File

@@ -1,6 +1,6 @@
---
id: 60eebd07ea685b0e777b5583
title: Step 1
title: 步驟 1
challengeType: 0
dashedName: step-1
---

View File

@@ -1,6 +1,6 @@
---
id: 60f027099a15b00485563dd2
title: Step 2
title: 步驟 2
challengeType: 0
dashedName: step-2
---

View File

@@ -1,6 +1,6 @@
---
id: 60f027c87bc98f050395c139
title: Step 3
title: 步驟 3
challengeType: 0
dashedName: step-3
---

View File

@@ -1,6 +1,6 @@
---
id: 60f0286404aefb0562a4fdf9
title: Step 4
title: 步驟 4
challengeType: 0
dashedName: step-4
---

View File

@@ -1,6 +1,6 @@
---
id: 60f02e7361b68405e27b62a5
title: Step 6
title: 步驟 6
challengeType: 0
dashedName: step-6
---

View File

@@ -1,6 +1,6 @@
---
id: 60f030d388cb74067cf291c3
title: Step 7
title: 步驟 7
challengeType: 0
dashedName: step-7
---

View File

@@ -1,6 +1,6 @@
---
id: 60f1922fcbd2410527b3bd89
title: Step 8
title: 步驟 8
challengeType: 0
dashedName: step-8
---

View File

@@ -1,6 +1,6 @@
---
id: 60f1a5e2d2c23707a4f9a660
title: Step 9
title: 步驟 9
challengeType: 0
dashedName: step-9
---

View File

@@ -1,6 +1,6 @@
---
id: 60f1a9cbd23023082e149fee
title: Step 10
title: 步驟 10
challengeType: 0
dashedName: step-10
---

View File

@@ -1,6 +1,6 @@
---
id: 60f5c3e399ff1a05629964e4
title: Step 11
title: 步驟 11
challengeType: 0
dashedName: step-11
---

View File

@@ -1,6 +1,6 @@
---
id: 60f5cb8875ab6a0610f05071
title: Step 13
title: 步驟 13
challengeType: 0
dashedName: step-13
---

View File

@@ -1,6 +1,6 @@
---
id: 60f5d2776c854e069560fbe6
title: Step 14
title: 步驟 14
challengeType: 0
dashedName: step-14
---

View File

@@ -1,6 +1,6 @@
---
id: 60f5dc35c07ac1078f140916
title: Step 15
title: 步驟 15
challengeType: 0
dashedName: step-15
---

View File

@@ -1,6 +1,6 @@
---
id: 60f803d5241e6a0433a523a1
title: Step 16
title: 步驟 16
challengeType: 0
dashedName: step-16
---

View File

@@ -1,6 +1,6 @@
---
id: 60f805f813eaf2049bc2ceea
title: Step 17
title: 步驟 17
challengeType: 0
dashedName: step-17
---

View File

@@ -1,6 +1,6 @@
---
id: 60f80e0081e0f2052ae5b505
title: Step 19
title: 步驟 19
challengeType: 0
dashedName: step-19
---

View File

@@ -1,6 +1,6 @@
---
id: 60f81167d0d4910809f88945
title: Step 20
title: 步驟 20
challengeType: 0
dashedName: step-20
---

View File

@@ -1,6 +1,6 @@
---
id: 60f81616cff80508badf9ad5
title: Step 21
title: 步驟 21
challengeType: 0
dashedName: step-21
---

View File

@@ -1,6 +1,6 @@
---
id: 60f83e7bfc09900959f41e20
title: Step 22
title: 步驟 22
challengeType: 0
dashedName: step-22
---

View File

@@ -1,6 +1,6 @@
---
id: 60f84ec41116b209c280ba91
title: Step 23
title: 步驟 23
challengeType: 0
dashedName: step-23
---

View File

@@ -1,28 +1,28 @@
---
id: 60f852f645b5310a8264f555
title: Step 24
title: 步驟 24
challengeType: 0
dashedName: step-24
---
# --description--
讓我們進入註冊表單的下一部分。 這部分讓用戶選擇要註冊的賬號類型,並且確保用戶已經閱讀了條款和協議。
讓我們進入註冊表單的下一部分。 This section will ask for the type of account the user is opening.
首先,在第二個 `fieldset` 內部添加三個 `label` 元素。
Start by adding two `label` elements to the second `fieldset`.
# --hints--
應該在第二個 `fieldset` 內部添加三個 `label` 元素。
You should add two `label` elements to the second `fieldset`.
```js
assert.equal(document.querySelectorAll('fieldset')?.[1]?.querySelectorAll('label')?.length, 3);
assert.equal(document.querySelectorAll('fieldset')?.[1]?.querySelectorAll('label')?.length, 2);
```
這些 `label` 元素應該是同級元素。
```js
assert.exists(document.querySelector('fieldset:nth-child(2)')?.querySelector('label + label + label'));
assert.exists(document.querySelector('fieldset:nth-child(2)')?.querySelector('label + label'));
```
# --seed--

View File

@@ -1,13 +1,13 @@
---
id: 60f85a62fb30c80bcea0cedb
title: Step 25
title: 步驟 25
challengeType: 0
dashedName: step-25
---
# --description--
用戶可以選擇 `Personal Account` 或者 `Business Account`
Users will be allowed to choose either a `Personal` or `Business`.
在前兩個 `label` 元素裏,添加一個 `type="radio"``input` 元素。
@@ -58,7 +58,6 @@ assert.equal(document.querySelectorAll('fieldset:nth-child(2) input[type="radio"
<fieldset>
<label></label>
<label></label>
<label></label>
</fieldset>
--fcc-editable-region--
<fieldset></fieldset>

View File

@@ -1,32 +1,43 @@
---
id: 60f8604682407e0d017bbf7f
title: Step 26
title: 步驟 26
challengeType: 0
dashedName: step-26
---
# --description--
對於條款及條件,在第三個 `label` 元素內添加一個 `type``checkbox``input` 元素。 另外,用戶需要在閱讀條款和條件之後才能註冊,所以將這個 `input` 框設置爲 `required`
Within each corresponding `label` element, and immediately after the `input` element, add a space and add the following text:
```md
Personal
Business
```
# --hints--
應該給第三個 `label` 元素添加一個 `input`
You should give the first `label` the text `Personal`.
```js
assert.exists(document.querySelector('fieldset:nth-child(2) label:nth-child(3) input'));
assert.include(document.querySelector('fieldset:nth-child(2) > label')?.innerText, 'Personal');
```
應該給 `input` 元素添加一個 `type` 屬性並設置其值爲 `checkbox`
You should give the second `label` the text `Business`.
```js
assert.equal(document.querySelector('fieldset:nth-child(2) label:nth-child(3) input')?.type, 'checkbox');
assert.include(document.querySelector('fieldset:nth-child(2) > label:nth-child(2)')?.innerText, 'Business');
```
應該給 `input` 元素添加一個 `required` 屬性。
You should give the first `label` text one space at the front.
```js
assert.equal(document.querySelector('fieldset:nth-child(2) label:nth-child(3) input')?.required, true);
assert.equal(document.querySelector('fieldset:nth-child(2) > label')?.innerText?.[0], ' ');
```
You should give the second `label` text one space at the front.
```js
assert.equal(document.querySelector('fieldset:nth-child(2) > label:nth-child(2)')?.innerText?.[0], ' ');
```
# --seed--
@@ -51,13 +62,12 @@ assert.equal(document.querySelector('fieldset:nth-child(2) label:nth-child(3) in
<label for="email">Enter Your Email: <input id="email" type="email" required /></label>
<label for="new-password">Create a New Password: <input id="new-password" type="password" pattern="[a-z0-5]{8,}" required /></label>
</fieldset>
--fcc-editable-region--
<fieldset>
<label><input type="radio" /></label>
<label><input type="radio" /></label>
<label></label>
</fieldset>
--fcc-editable-region--
<label><input type="radio" /></label>
<label><input type="radio" /></label>
--fcc-editable-region--
</fieldset>
<fieldset></fieldset>
<input type="submit" value="Submit" />
</form>

View File

@@ -1,56 +1,28 @@
---
id: 60f8618d191b940d62038513
title: Step 27
title: 步驟 27
challengeType: 0
dashedName: step-27
---
# --description--
在每一個相應的 `label` 元素內,`input` 元素後面內,添加一個空格以及如下文字:
You only want one radio input to be selectable at a time. However, the form does not know the radio inputs are related.
```md
Personal Account
Business Account
I accept the terms and conditions
```
To relate the radio inputs, give them the same `name` attribute with a value of `account-type`. Now, it is not possible to select both radio inputs at the same time.
# --hints--
第一個 `label` 的文字應該爲 `Personal Account`
You should give the first radio input the `name` attribute with a value of `account-type`.
```js
assert.include(document.querySelector('fieldset:nth-child(2) > label')?.innerText, 'Personal Account');
assert.equal(document.querySelector('fieldset:nth-child(2) label:nth-child(1) input[type="radio"]')?.name, 'account-type');
```
第二個 `label` 的文字應該爲 `Business Account`
You should give the second radio input the `name` attribute with a value of `account-type`.
```js
assert.include(document.querySelector('fieldset:nth-child(2) > label:nth-child(2)')?.innerText, 'Business Account');
```
第三個 `label` 的文字應該爲 `I accept the terms and conditions`
```js
assert.include(document.querySelector('fieldset:nth-child(2) > label:nth-child(3)')?.innerText, 'I accept the terms and conditions');
```
第一個 `label` 的文字前面應該有一個空格。
```js
assert.equal(document.querySelector('fieldset:nth-child(2) > label')?.innerText?.[0], ' ');
```
第二個 `label` 的文字前面應該有一個空格。
```js
assert.equal(document.querySelector('fieldset:nth-child(2) > label:nth-child(2)')?.innerText?.[0], ' ');
```
第三個 `label` 的文字前面應該有一個空格。
```js
assert.equal(document.querySelector('fieldset:nth-child(2) > label:nth-child(3)')?.innerText?.[0], ' ');
assert.equal(document.querySelector('fieldset:nth-child(2) label:nth-child(2) input[type="radio"]')?.name, 'account-type');
```
# --seed--
@@ -77,9 +49,8 @@ assert.equal(document.querySelector('fieldset:nth-child(2) > label:nth-child(3)'
</fieldset>
--fcc-editable-region--
<fieldset>
<label><input type="radio" /></label>
<label><input type="radio" /></label>
<label><input type="checkbox" required /></label>
<label><input type="radio" /> Personal</label>
<label><input type="radio" /> Business</label>
</fieldset>
--fcc-editable-region--
<fieldset></fieldset>

View File

@@ -1,34 +1,40 @@
---
id: 60fab4a123ce4b04526b082b
title: Step 28
title: 步驟 28
challengeType: 0
dashedName: step-28
---
# --description--
我們希望單選按鈕一次只能選中一個。 然而,表單並不知道這些單選按鈕是一組的。
Currently when someone submit the form, they can submit it without checking the radio inputs. Although you had used `required` attribute to indicate the the input is required previously, this can't work in this case, because adding required to both inputs, will convey the wrong information to the form users.
給每一個單選按鈕添加相同的 `name` 屬性並設置其值爲 `account-type`,以關聯單選按鈕。 現在,兩個單選按鈕就無法同時選中了。
To solve this, you can provide context of what is needed by adding `legend` element below the second `fieldset` with text `Account type (required)`, then add `checked` attribute to the `Personal` input to make sure that the form is submitted with the required data in it.
# --hints--
第一個單選按鈕的 `name` 屬性的值應該爲 `account-type`
Your `input` elements should remain `type` of `radio`.
```js
assert.equal(document.querySelector('fieldset:nth-child(2) label:nth-child(1) input[type="radio"]')?.name, 'account-type');
assert.equal(document.querySelectorAll('fieldset:nth-child(2) input[type="radio"]')?.length, 2);
```
第二個單選按鈕的 `name` 屬性的值應該爲 `account-type`
You should add a `legend` element within the second `fieldset` element.
```js
assert.equal(document.querySelector('fieldset:nth-child(2) label:nth-child(2) input[type="radio"]')?.name, 'account-type');
assert.equal(document.querySelectorAll('fieldset:nth-of-type(2) > legend')?.length, 1);
```
不應該指定 `checkbox``name` 屬性。
You should add `Account type (required)` text to the `legend` element.
```js
assert.isEmpty(document.querySelector('fieldset:nth-child(2) label:nth-child(3) input[type="checkbox"]')?.name);
assert.equal(document.querySelector('fieldset:nth-of-type(2) > legend')?.textContent, 'Account type (required)');
```
You should give an attribute of `checked` to the `Personal` input.
```js
assert.isTrue(document.querySelector('fieldset:nth-child(2) input[type="radio"]')?.hasAttribute('checked'));
```
# --seed--
@@ -55,9 +61,9 @@ assert.isEmpty(document.querySelector('fieldset:nth-child(2) label:nth-child(3)
</fieldset>
--fcc-editable-region--
<fieldset>
<label><input type="radio" /> Personal Account</label>
<label><input type="radio" /> Business Account</label>
<label><input type="checkbox" required /> I accept the terms and conditions</label>
<label><input type="radio" name="account-type" /> Personal</label>
<label><input type="radio" name="account-type" /> Business</label>
</fieldset>
--fcc-editable-region--
<fieldset></fieldset>

View File

@@ -7,7 +7,7 @@ dashedName: step-31
# --description--
要完成此 `fieldset`,請將第三個 `label` 中的文本 `terms and conditions` 鏈接到以下位置:
Add `I accept the terms and conditions` text to the newly added label, then link the text `terms and conditions` to the following location:
```md
https://www.freecodecamp.org/news/terms-of-service/
@@ -15,22 +15,28 @@ https://www.freecodecamp.org/news/terms-of-service/
# --hints--
應該使用 `a` 元素來給條款和條件添加超鏈接。
You should add `I accept the terms and conditions` text to the label following the third fieldset.
```js
assert.exists(document.querySelector('fieldset:nth-child(2) > label:nth-child(3) > input + a'));
assert.equal(document.querySelector('fieldset:nth-child(3) + label')?.innerText.trim(), 'I accept the terms and conditions');
```
應該給 `a` 元素添加一個 `href` 屬性並設置其值爲 `https://www.freecodecamp.org/news/terms-of-service/`
You should use an `a` element to link to the terms and conditions.
```js
assert.match(document.querySelector('fieldset:nth-child(2) > label:nth-child(3) > input + a')?.href, /https:\/\/www\.freecodecamp\.org\/news\/terms-of-service\/?/);
assert.exists(document.querySelector('fieldset:nth-child(3) + label > input + a'));
```
`a` 應該在文字 `terms and conditions` 外面。
You should give the `a` element an `href` of `https://www.freecodecamp.org/news/terms-of-service/`.
```js
assert.equal(document.querySelector('fieldset:nth-child(2) > label:nth-child(3) > input + a')?.textContent, 'terms and conditions');
assert.match(document.querySelector('fieldset:nth-child(3) + label > input + a')?.href, /https:\/\/www\.freecodecamp\.org\/news\/terms-of-service\/?/);
```
You should only wrap the `a` element around the text `terms and conditions`.
```js
assert.equal(document.querySelector('fieldset:nth-child(3) + label > input + a')?.textContent, 'terms and conditions');
```
# --seed--
@@ -55,14 +61,15 @@ assert.equal(document.querySelector('fieldset:nth-child(2) > label:nth-child(3)
<label for="email">Enter Your Email: <input id="email" type="email" required /></label>
<label for="new-password">Create a New Password: <input id="new-password" type="password" pattern="[a-z0-5]{8,}" required /></label>
</fieldset>
--fcc-editable-region--
<fieldset>
<label for="personal-account"><input id="personal-account" type="radio" name="account-type" /> Personal Account</label>
<label for="business-account"><input id="business-account" type="radio" name="account-type" /> Business Account</label>
<label for="terms-and-conditions"><input id="terms-and-conditions" type="checkbox" required /> I accept the terms and conditions</label>
<legend>Account type (required)</legend>
<label for="personal-account"><input id="personal-account" type="radio" name="account-type" checked /> Personal</label>
<label for="business-account"><input id="business-account" type="radio" name="account-type" /> Business</label>
</fieldset>
--fcc-editable-region--
<fieldset></fieldset>
--fcc-editable-region--
<label for="terms-and-conditions"><input id="terms-and-conditions" type="checkbox" required /></label>
--fcc-editable-region--
<input type="submit" value="Submit" />
</form>
</body>

View File

@@ -54,17 +54,18 @@ assert.equal(document.querySelector('fieldset:nth-child(3) > label > input')?.ty
<label for="new-password">Create a New Password: <input id="new-password" type="password" pattern="[a-z0-5]{8,}" required /></label>
</fieldset>
<fieldset>
<label for="personal-account"><input id="personal-account" type="radio" name="account-type" /> Personal Account</label>
<label for="business-account"><input id="business-account" type="radio" name="account-type" /> Business Account</label>
<label for="terms-and-conditions">
<input id="terms-and-conditions" type="checkbox" required /> I accept the <a href="https://www.freecodecamp.org/news/terms-of-service/">terms and conditions</a>
</label>
<legend>Account type (required)</legend>
<label for="personal-account"><input id="personal-account" type="radio" name="account-type" checked /> Personal</label>
<label for="business-account"><input id="business-account" type="radio" name="account-type" /> Business</label>
</fieldset>
--fcc-editable-region--
<fieldset>
</fieldset>
--fcc-editable-region--
<label for="terms-and-conditions">
<input id="terms-and-conditions" type="checkbox" required /> I accept the <a href="https://www.freecodecamp.org/news/terms-of-service/">terms and conditions</a>
</label>
<input type="submit" value="Submit" />
</form>
</body>

View File

@@ -68,11 +68,9 @@ assert.equal(document.querySelector('fieldset:nth-child(3) > label:nth-child(2)
<label for="new-password">Create a New Password: <input id="new-password" type="password" pattern="[a-z0-5]{8,}" required /></label>
</fieldset>
<fieldset>
<label for="personal-account"><input id="personal-account" type="radio" name="account-type" /> Personal Account</label>
<label for="business-account"><input id="business-account" type="radio" name="account-type" /> Business Account</label>
<label for="terms-and-conditions">
<input id="terms-and-conditions" type="checkbox" required /> I accept the <a href="https://www.freecodecamp.org/news/terms-of-service/">terms and conditions</a>
</label>
<legend>Account type (required)</legend>
<label for="personal-account"><input id="personal-account" type="radio" name="account-type" checked /> Personal</label>
<label for="business-account"><input id="business-account" type="radio" name="account-type" /> Business</label>
</fieldset>
--fcc-editable-region--
<fieldset>
@@ -80,6 +78,9 @@ assert.equal(document.querySelector('fieldset:nth-child(3) > label:nth-child(2)
</fieldset>
--fcc-editable-region--
<label for="terms-and-conditions">
<input id="terms-and-conditions" type="checkbox" required /> I accept the <a href="https://www.freecodecamp.org/news/terms-of-service/">terms and conditions</a>
</label>
<input type="submit" value="Submit" />
</form>
</body>

View File

@@ -48,11 +48,9 @@ assert.equal(document.querySelectorAll('fieldset:nth-child(3) > select > option'
<label for="new-password">Create a New Password: <input id="new-password" type="password" pattern="[a-z0-5]{8,}" required /></label>
</fieldset>
<fieldset>
<label for="personal-account"><input id="personal-account" type="radio" name="account-type" /> Personal Account</label>
<label for="business-account"><input id="business-account" type="radio" name="account-type" /> Business Account</label>
<label for="terms-and-conditions">
<input id="terms-and-conditions" type="checkbox" required /> I accept the <a href="https://www.freecodecamp.org/news/terms-of-service/">terms and conditions</a>
</label>
<legend>Account type (required)</legend>
<label for="personal-account"><input id="personal-account" type="radio" name="account-type" checked /> Personal</label>
<label for="business-account"><input id="business-account" type="radio" name="account-type" /> Business</label>
</fieldset>
--fcc-editable-region--
<fieldset>
@@ -61,6 +59,9 @@ assert.equal(document.querySelectorAll('fieldset:nth-child(3) > select > option'
</fieldset>
--fcc-editable-region--
<label for="terms-and-conditions">
<input id="terms-and-conditions" type="checkbox" required /> I accept the <a href="https://www.freecodecamp.org/news/terms-of-service/">terms and conditions</a>
</label>
<input type="submit" value="Submit" />
</form>
</body>

View File

@@ -58,11 +58,9 @@ assert.equal(document.querySelectorAll('fieldset > label > select > option')?.le
<label for="new-password">Create a New Password: <input id="new-password" type="password" pattern="[a-z0-5]{8,}" required /></label>
</fieldset>
<fieldset>
<label for="personal-account"><input id="personal-account" type="radio" name="account-type" /> Personal Account</label>
<label for="business-account"><input id="business-account" type="radio" name="account-type" /> Business Account</label>
<label for="terms-and-conditions">
<input id="terms-and-conditions" type="checkbox" required /> I accept the <a href="https://www.freecodecamp.org/news/terms-of-service/">terms and conditions</a>
</label>
<legend>Account type (required)</legend>
<label for="personal-account"><input id="personal-account" type="radio" name="account-type" checked /> Personal</label>
<label for="business-account"><input id="business-account" type="radio" name="account-type" /> Business</label>
</fieldset>
--fcc-editable-region--
<fieldset>
@@ -77,6 +75,9 @@ assert.equal(document.querySelectorAll('fieldset > label > select > option')?.le
</select>
</fieldset>
--fcc-editable-region--
<label for="terms-and-conditions">
<input id="terms-and-conditions" type="checkbox" required /> I accept the <a href="https://www.freecodecamp.org/news/terms-of-service/">terms and conditions</a>
</label>
<input type="submit" value="Submit" />
</form>
</body>

View File

@@ -72,11 +72,9 @@ assert.equal(document.querySelectorAll('fieldset:nth-child(3) > label:nth-child(
<label for="new-password">Create a New Password: <input id="new-password" type="password" pattern="[a-z0-5]{8,}" required /></label>
</fieldset>
<fieldset>
<label for="personal-account"><input id="personal-account" type="radio" name="account-type" /> Personal Account</label>
<label for="business-account"><input id="business-account" type="radio" name="account-type" /> Business Account</label>
<label for="terms-and-conditions">
<input id="terms-and-conditions" type="checkbox" required /> I accept the <a href="https://www.freecodecamp.org/news/terms-of-service/">terms and conditions</a>
</label>
<legend>Account type (required)</legend>
<label for="personal-account"><input id="personal-account" type="radio" name="account-type" checked /> Personal</label>
<label for="business-account"><input id="business-account" type="radio" name="account-type" /> Business</label>
</fieldset>
--fcc-editable-region--
<fieldset>
@@ -93,6 +91,9 @@ assert.equal(document.querySelectorAll('fieldset:nth-child(3) > label:nth-child(
</label>
</fieldset>
--fcc-editable-region--
<label for="terms-and-conditions">
<input id="terms-and-conditions" type="checkbox" required /> I accept the <a href="https://www.freecodecamp.org/news/terms-of-service/">terms and conditions</a>
</label>
<input type="submit" value="Submit" />
</form>
</body>

View File

@@ -66,11 +66,9 @@ assert.equal(document.querySelectorAll('fieldset:nth-child(3) > label:nth-child(
<label for="new-password">Create a New Password: <input id="new-password" type="password" pattern="[a-z0-5]{8,}" required /></label>
</fieldset>
<fieldset>
<label for="personal-account"><input id="personal-account" type="radio" name="account-type" /> Personal Account</label>
<label for="business-account"><input id="business-account" type="radio" name="account-type" /> Business Account</label>
<label for="terms-and-conditions">
<input id="terms-and-conditions" type="checkbox" required /> I accept the <a href="https://www.freecodecamp.org/news/terms-of-service/">terms and conditions</a>
</label>
<legend>Account type (required)</legend>
<label for="personal-account"><input id="personal-account" type="radio" name="account-type" checked/> Personal</label>
<label for="business-account"><input id="business-account" type="radio" name="account-type" /> Business</label>
</fieldset>
--fcc-editable-region--
<fieldset>
@@ -87,6 +85,9 @@ assert.equal(document.querySelectorAll('fieldset:nth-child(3) > label:nth-child(
</label>
</fieldset>
--fcc-editable-region--
<label for="terms-and-conditions">
<input id="terms-and-conditions" type="checkbox" required /> I accept the <a href="https://www.freecodecamp.org/news/terms-of-service/">terms and conditions</a>
</label>
<input type="submit" value="Submit" />
</form>
</body>

View File

@@ -60,11 +60,9 @@ assert.match(code, /<textarea\s*>[\s\S]*<\/textarea\s*>/);
<label for="new-password">Create a New Password: <input id="new-password" type="password" pattern="[a-z0-5]{8,}" required /></label>
</fieldset>
<fieldset>
<label for="personal-account"><input id="personal-account" type="radio" name="account-type" /> Personal Account</label>
<label for="business-account"><input id="business-account" type="radio" name="account-type" /> Business Account</label>
<label for="terms-and-conditions">
<input id="terms-and-conditions" type="checkbox" required /> I accept the <a href="https://www.freecodecamp.org/news/terms-of-service/">terms and conditions</a>
</label>
<legend>Account type (required)</legend>
<label for="personal-account"><input id="personal-account" type="radio" name="account-type" checked /> Personal</label>
<label for="business-account"><input id="business-account" type="radio" name="account-type" /> Business</label>
</fieldset>
--fcc-editable-region--
<fieldset>
@@ -82,6 +80,9 @@ assert.match(code, /<textarea\s*>[\s\S]*<\/textarea\s*>/);
</fieldset>
--fcc-editable-region--
<label for="terms-and-conditions">
<input id="terms-and-conditions" type="checkbox" required /> I accept the <a href="https://www.freecodecamp.org/news/terms-of-service/">terms and conditions</a>
</label>
<input type="submit" value="Submit" />
</form>
</body>

View File

@@ -48,11 +48,9 @@ assert.equal(document.querySelector('fieldset:nth-child(3) > label:nth-child(4)
<label for="new-password">Create a New Password: <input id="new-password" type="password" pattern="[a-z0-5]{8,}" required /></label>
</fieldset>
<fieldset>
<label for="personal-account"><input id="personal-account" type="radio" name="account-type" /> Personal Account</label>
<label for="business-account"><input id="business-account" type="radio" name="account-type" /> Business Account</label>
<label for="terms-and-conditions">
<input id="terms-and-conditions" type="checkbox" required /> I accept the <a href="https://www.freecodecamp.org/news/terms-of-service/">terms and conditions</a>
</label>
<legend>Account type (required)</legend>
<label for="personal-account"><input id="personal-account" type="radio" name="account-type" checked /> Personal</label>
<label for="business-account"><input id="business-account" type="radio" name="account-type" /> Business</label>
</fieldset>
--fcc-editable-region--
<fieldset>
@@ -72,6 +70,9 @@ assert.equal(document.querySelector('fieldset:nth-child(3) > label:nth-child(4)
</label>
</fieldset>
--fcc-editable-region--
<label for="terms-and-conditions">
<input id="terms-and-conditions" type="checkbox" required /> I accept the <a href="https://www.freecodecamp.org/news/terms-of-service/">terms and conditions</a>
</label>
<input type="submit" value="Submit" />
</form>
</body>

View File

@@ -48,11 +48,9 @@ assert.match(document.querySelector('fieldset:nth-child(3) > label:nth-child(4)
<label for="new-password">Create a New Password: <input id="new-password" type="password" pattern="[a-z0-5]{8,}" required /></label>
</fieldset>
<fieldset>
<label for="personal-account"><input id="personal-account" type="radio" name="account-type" /> Personal Account</label>
<label for="business-account"><input id="business-account" type="radio" name="account-type" /> Business Account</label>
<label for="terms-and-conditions">
<input id="terms-and-conditions" type="checkbox" required /> I accept the <a href="https://www.freecodecamp.org/news/terms-of-service/">terms and conditions</a>
</label>
<legend>Account type (required)</legend>
<label for="personal-account"><input id="personal-account" type="radio" name="account-type" checked /> Personal</label>
<label for="business-account"><input id="business-account" type="radio" name="account-type" /> Business</label>
</fieldset>
--fcc-editable-region--
<fieldset>
@@ -72,6 +70,9 @@ assert.match(document.querySelector('fieldset:nth-child(3) > label:nth-child(4)
</label>
</fieldset>
--fcc-editable-region--
<label for="terms-and-conditions">
<input id="terms-and-conditions" type="checkbox" required /> I accept the <a href="https://www.freecodecamp.org/news/terms-of-service/">terms and conditions</a>
</label>
<input type="submit" value="Submit" />
</form>
</body>

View File

@@ -109,11 +109,9 @@ assert.isNotEmpty(document.querySelector('textarea')?.name);
<label for="new-password">Create a New Password: <input id="new-password" type="password" pattern="[a-z0-5]{8,}" required /></label>
</fieldset>
<fieldset>
<label for="personal-account"><input id="personal-account" type="radio" name="account-type" /> Personal Account</label>
<label for="business-account"><input id="business-account" type="radio" name="account-type" /> Business Account</label>
<label for="terms-and-conditions">
<input id="terms-and-conditions" type="checkbox" required /> I accept the <a href="https://www.freecodecamp.org/news/terms-of-service/">terms and conditions</a>
</label>
<legend>Account type (required)</legend>
<label for="personal-account"><input id="personal-account" type="radio" name="account-type" checked /> Personal</label>
<label for="business-account"><input id="business-account" type="radio" name="account-type" /> Business</label>
</fieldset>
<fieldset>
<label for="profile-picture">Upload a profile picture: <input id="profile-picture" type="file"/></label>
@@ -131,7 +129,10 @@ assert.isNotEmpty(document.querySelector('textarea')?.name);
<textarea id ="bio" rows="3" cols="30" placeholder="I like coding on the beach..."></textarea>
</label>
</fieldset>
--fcc-editable-region--
<label for="terms-and-conditions">
<input id="terms-and-conditions" type="checkbox" required /> I accept the <a href="https://www.freecodecamp.org/news/terms-of-service/">terms and conditions</a>
</label>
--fcc-editable-region--
<input type="submit" value="Submit" />
</form>
</body>

View File

@@ -54,11 +54,9 @@ assert.equal(new __helpers.CSSHelp(document).getStyle('body')?.fontSize, '16px')
<label for="new-password">Create a New Password: <input id="new-password" name="new-password" type="password" pattern="[a-z0-5]{8,}" required /></label>
</fieldset>
<fieldset>
<label for="personal-account"><input id="personal-account" type="radio" name="account-type" /> Personal Account</label>
<label for="business-account"><input id="business-account" type="radio" name="account-type" /> Business Account</label>
<label for="terms-and-conditions">
<input id="terms-and-conditions" type="checkbox" required name="terms-and-conditions" /> I accept the <a href="https://www.freecodecamp.org/news/terms-of-service/">terms and conditions</a>
</label>
<legend>Account type (required)</legend>
<label for="personal-account"><input id="personal-account" type="radio" name="account-type" checked /> Personal</label>
<label for="business-account"><input id="business-account" type="radio" name="account-type" /> Business</label>
</fieldset>
<fieldset>
<label for="profile-picture">Upload a profile picture: <input id="profile-picture" type="file" name="file" /></label>
@@ -76,6 +74,9 @@ assert.equal(new __helpers.CSSHelp(document).getStyle('body')?.fontSize, '16px')
<textarea id="bio" name="bio" rows="3" cols="30" placeholder="I like coding on the beach..."></textarea>
</label>
</fieldset>
<label for="terms-and-conditions">
<input id="terms-and-conditions" type="checkbox" required name="terms-and-conditions" /> I accept the <a href="https://www.freecodecamp.org/news/terms-of-service/">terms and conditions</a>
</label>
<input type="submit" value="Submit" />
</form>
</body>

Some files were not shown because too many files have changed in this diff Show More