fix(curriculum): Replace single-line blocks with multi-line blocks for Responsive Web Design (#41519)

* fix(curriculum) replace single-line block with multi-line blocks

* fix(curriculum) replace single-line block with multi-line blocks (missed blocks)
This commit is contained in:
Sem Bauke
2021-03-19 00:24:09 +01:00
committed by GitHub
parent a4e4ffce99
commit b064991667
36 changed files with 136 additions and 48 deletions

View File

@@ -11,7 +11,9 @@ dashedName: add-a-text-alternative-to-images-for-visually-impaired-accessibility
You've likely seen an `alt` attribute on an `img` tag in other challenges. `alt` text describes the image's content and provides a text-alternative for it. An `alt` attribute helps in cases where the image fails to load or can't be seen by a user. Search engines also use it to understand what an image contains to include it in search results. Here's an example:
`<img src="importantLogo.jpeg" alt="Company logo">`
```html
<img src="importantLogo.jpeg" alt="Company logo">
```
People with visual impairments rely on screen readers to convert web content to an audio interface. They won't get information if it's only presented visually. For images, screen readers can access the `alt` attribute and read its contents to deliver key information.

View File

@@ -13,7 +13,9 @@ In the last challenge, you learned that including an `alt` attribute when using
When an image is already explained with text content or does not add meaning to a page, the `img` still needs an `alt` attribute, but it can be set to an empty string. Here's an example:
`<img src="visualDecoration.jpeg" alt="">`
```html
<img src="visualDecoration.jpeg" alt="">
```
Background images usually fall under the 'decorative' label as well. However, they are typically applied with CSS rules, and therefore not part of the markup screen readers process.

View File

@@ -15,7 +15,9 @@ HTML5 allows this attribute to be used on any element, but it's particularly use
Here's an example:
`<button accesskey="b">Important Button</button>`
```html
<button accesskey="b">Important Button</button>
```
# --instructions--

View File

@@ -13,7 +13,9 @@ Continuing with the date theme, HTML5 also introduced the `time` element along w
Here's an example:
`<p>Master Camper Cat officiated the cage match between Goro and Scorpion <time datetime="2013-02-13">last Wednesday</time>, which ended in a draw.</p>`
```html
<p>Master Camper Cat officiated the cage match between Goro and Scorpion <time datetime="2013-02-13">last Wednesday</time>, which ended in a draw.</p>
```
# --instructions--

View File

@@ -13,7 +13,9 @@ The HTML `tabindex` attribute has three distinct functions relating to an elemen
Certain elements, such as links and form controls, automatically receive keyboard focus when a user tabs through a page. It's in the same order as the elements come in the HTML source markup. This same functionality can be given to other elements, such as `div`, `span`, and `p`, by placing a `tabindex="0"` attribute on them. Here's an example:
`<div tabindex="0">I need keyboard focus!</div>`
```html
<div tabindex="0">I need keyboard focus!</div>
```
**Note:** A negative `tabindex` value (typically -1) indicates that an element is focusable, but is not reachable by the keyboard. This method is generally used to bring focus to content programmatically (like when a `div` used for a pop-up window is activated), and is beyond the scope of these challenges.

View File

@@ -17,9 +17,13 @@ It's important to note that when the tab order is set this way, it overrides the
Here's an example:
`<div tabindex="1">I get keyboard focus, and I get it first!</div>`
```html
<div tabindex="1">I get keyboard focus, and I get it first!</div>
```
`<div tabindex="2">I get keyboard focus, and I get it second!</div>`
```html
<div tabindex="2">I get keyboard focus, and I get it second!</div>
```
# --instructions--