* feat(tools): add seed/solution restore script * chore(curriculum): remove empty sections' markers * chore(curriculum): add seed + solution to Chinese * chore: remove old formatter * fix: update getChallenges parse translated challenges separately, without reference to the source * chore(curriculum): add dashedName to English * chore(curriculum): add dashedName to Chinese * refactor: remove unused challenge property 'name' * fix: relax dashedName requirement * fix: stray tag Remove stray `pre` tag from challenge file. Signed-off-by: nhcarrigan <nhcarrigan@gmail.com> Co-authored-by: nhcarrigan <nhcarrigan@gmail.com>
2.5 KiB
id, title, challengeType, videoUrl, forumTopicId, dashedName
id | title | challengeType | videoUrl | forumTopicId | dashedName |
---|---|---|---|---|---|
587d778f367417b2b2512aae | Give Links Meaning by Using Descriptive Link Text | 0 | https://scrimba.com/c/c437DcV | 301013 | give-links-meaning-by-using-descriptive-link-text |
--description--
Screen reader users have different options for what type of content their device reads. This includes skipping to (or over) landmark elements, jumping to the main content, or getting a page summary from the headings. Another option is to only hear the links available on a page.
Screen readers do this by reading the link text, or what's between the anchor (a
) tags. Having a list of "click here" or "read more" links isn't helpful. Instead, you should use brief but descriptive text within the a
tags to provide more meaning for these users.
--instructions--
The link text that Camper Cat is using is not very descriptive without the surrounding context. Move the anchor (a
) tags so they wrap around the text "information about batteries" instead of "Click here".
--hints--
Your code should move the anchor a
tags from around the words "Click here" to wrap around the words "information about batteries".
assert(
$('a')
.text()
.match(/^(information about batteries)$/g)
);
The a
element should have an href
attribute with a value of an empty string ""
.
assert($('a').attr('href') === '');
The a
element should have a closing tag.
assert(
code.match(/<\/a>/g) &&
code.match(/<\/a>/g).length === code.match(/<a href=(''|"")>/g).length
);
--seed--
--seed-contents--
<body>
<header>
<h1>Deep Thoughts with Master Camper Cat</h1>
</header>
<article>
<h2>Defeating your Foe: the Red Dot is Ours!</h2>
<p>Felines the world over have been waging war on the most persistent of foes. This red nemesis combines both cunning stealth and lightning speed. But chin up, fellow fighters, our time for victory may soon be near. <a href="">Click here</a> for information about batteries</p>
</article>
</body>
--solutions--
<body>
<header>
<h1>Deep Thoughts with Master Camper Cat</h1>
</header>
<article>
<h2>Defeating your Foe: the Red Dot is Ours!</h2>
<p>Felines the world over have been waging war on the most persistent of foes. This red nemesis combines both cunning stealth and lightning speed. But chin up, fellow fighters, our time for victory may soon be near. Click here for <a href="">information about batteries</a></p>
</article>
</body>