You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: curriculum/challenges/english/25-front-end-development/review-html-accessibility/671a87a39b88245a579c2271.md
+15-15Lines changed: 15 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -33,13 +33,13 @@ Review the concepts below to prepare for the upcoming quiz.
33
33
-**Importance of good `alt` text**: You should use the `alt` attribute to provide a text alternative for images. This helps people using assistive technologies understand the content of the image.
34
34
-**Importance of good link text**: You should use descriptive link text to help users understand the purpose of the link. This helps people using assistive technologies understand the purpose of the link.
35
35
-**Best practices for making audio and video content accessible**: You should provide captions and transcripts for audio and video content to make it accessible to people with hearing impairments. You should also provide audio descriptions for video content to make it accessible to people with visual impairments.
36
-
-**`tabindex` attribute**: Used to make elements focusable and define the relative order in which they should be navigated using the keyboard. It is important to never use the `tabindex` attribute with a value greater than 0. Instead, you should either use a value of 0 or -1. For more information, review the prior lecture video on keyboard accessibility.
36
+
-**`tabindex` attribute**: Used to make elements focusable and define the relative order in which they should be navigated using the keyboard. It is important to never use the `tabindex` attribute with a value greater than 0. Instead, you should either use a value of 0 or -1. For more information, review the prior lecture video on keyboard accessibility.
37
37
38
38
```html
39
39
<ptabindex="-1">Sorry, there was an error with your submission.</p>
40
40
```
41
41
42
-
-**`accesskey` attribute**: Used to define a keyboard shortcut for an element. This can help users with mobility impairments navigate the website more easily.
42
+
-**`accesskey` attribute**: Used to define a keyboard shortcut for an element. This can help users with mobility impairments navigate the website more easily.
43
43
44
44
```html
45
45
<buttonaccesskey="s">Save</button>
@@ -50,7 +50,7 @@ Review the concepts below to prepare for the upcoming quiz.
50
50
## WAI-ARIA, Roles, and Attributes
51
51
52
52
-**WAI-ARIA**: It stands for Web Accessibility Initiative - Accessible Rich Internet Applications. It is a set of attributes that can be added to HTML elements to improve accessibility. It provides additional information to assistive technologies about the purpose and structure of the content.
53
-
-**Aria roles**: A set of predefined roles that can be added to HTML elements to define their purpose. This helps people using assistive technologies understand the content of the website. Examples include `role="tab"`, `role="menu"`, and `role="alert"`.
53
+
-**ARIA roles**: A set of predefined roles that can be added to HTML elements to define their purpose. This helps people using assistive technologies understand the content of the website. Examples include `role="tab"`, `role="menu"`, and `role="alert"`.
54
54
55
55
There are six main categories of ARIA roles:
56
56
@@ -61,7 +61,7 @@ There are six main categories of ARIA roles:
61
61
-**Window roles**: These roles define sub-windows, like pop up modal dialogues. These roles include `alertdialog` and `dialog`.
62
62
-**Abstract roles**: These roles help organize the document. They're only meant to be used internally by the browser, not by developers, so you should know that they exist but you shouldn't use them on your websites or web applications.
63
63
64
-
-**`aria-label` and `aria-labelledby` attributes**: These attributes are used to give an element a programmatic (or accessible) name, which helps people using assistive technology (such as screen readers) understand the purpose of the element. They are often used when the visual label for an element is an image or symbol rather than text. `aria-label` allows you to define the name directly in the attribute while `aria-labelledby` allows you to reference existing text on the page.
64
+
-**`aria-label` and `aria-labelledby` attributes**: These attributes are used to give an element a programmatic (or accessible) name, which helps people using assistive technology (such as screen readers) understand the purpose of the element. They are often used when the visual label for an element is an image or symbol rather than text. `aria-label` allows you to define the name directly in the attribute while `aria-labelledby` allows you to reference existing text on the page.
65
65
66
66
```html
67
67
<buttonaria-label="Search">
@@ -74,7 +74,7 @@ There are six main categories of ARIA roles:
-**`aria-hidden` attribute**: Used to hide an element from people using assistive technology such as screen readers. For example, this can be used to hide decorative images that do not provide any meaningful content.
77
+
-**`aria-hidden` attribute**: Used to hide an element from people using assistive technology such as screen readers. For example, this can be used to hide decorative images that do not provide any meaningful content.
78
78
79
79
```html
80
80
<button>
@@ -83,13 +83,13 @@ There are six main categories of ARIA roles:
83
83
</button>
84
84
```
85
85
86
-
-**`aria-expanded` attribute**: Used to convey the state of a toggle (or disclosure) feature to screen reader users.
86
+
-**`aria-expanded` attribute**: Used to convey the state of a toggle (or disclosure) feature to screen reader users.
87
87
88
88
```html
89
89
<buttonaria-expanded="true">Menu</button>
90
90
```
91
91
92
-
-**`aria-live` attribute**: Used to indicate that an element's content is important enough to require that any changes to the content should be announced immediately to screen reader users. This can include status messages like updating the number of results returned from a search, or an error message displayed after an unsuccessful form submission.
92
+
-**`aria-live` attribute**: Used to indicate that an element's content is important enough to require that any changes to the content should be announced immediately to screen reader users. This can include status messages like updating the number of results returned from a search, or an error message displayed after an unsuccessful form submission.
93
93
94
94
```html
95
95
<divaria-live="assertive">
@@ -103,9 +103,9 @@ There are six main categories of ARIA roles:
103
103
</div>
104
104
```
105
105
106
-
-**Common Aria states**: Common Aria states include `aria-haspopup`, `aria-checked`, `aria-disabled`, and `aria-selected`. These attributes can be used to indicate the state of an element and help people using assistive technologies understand the content of the website.
107
-
-**`aria-haspopup` attribute**: This state is used to indicate that an interactive element will trigger a pop-up element when activated. You can only use the `aria-haspopup` attribute when the pop-up has one of the following roles: `menu`, `listbox`, `tree`, `grid`, or `dialog`. The value of `aria-haspopup` must be either one of these roles or `true`, which is the same as `menu`.
108
-
106
+
-**Common ARIA states**: Common ARIA states include `aria-haspopup`, `aria-checked`, `aria-disabled`, and `aria-selected`. These attributes can be used to indicate the state of an element and help people using assistive technologies understand the content of the website.
107
+
-**`aria-haspopup` attribute**: This state is used to indicate that an interactive element will trigger a pop-up element when activated. You can only use the `aria-haspopup` attribute when the pop-up has one of the following roles: `menu`, `listbox`, `tree`, `grid`, or `dialog`. The value of `aria-haspopup` must be either one of these roles or `true`, which is the same as `menu`.
@@ -116,19 +116,19 @@ There are six main categories of ARIA roles:
116
116
</ul>
117
117
```
118
118
119
-
-**`aria-checked` attribute**: This attribute is used to indicate whether an element is in the checked state. It is most commonly used when creating custom checkboxes, radio buttons, switches, and listboxes.
119
+
-**`aria-checked` attribute**: This attribute is used to indicate whether an element is in the checked state. It is most commonly used when creating custom checkboxes, radio buttons, switches, and listboxes.
-**`aria-disabled` attribute**: This state is used to indicate that an element is disabled only to people using assistive technologies, such as screen readers.
125
+
-**`aria-disabled` attribute**: This state is used to indicate that an element is disabled only to people using assistive technologies, such as screen readers.
-**`aria-selected` attribute**: This state is used to indicate that an element is selected. You can use this state on custom controls like a tabbed interface, a listbox, or a grid.
131
+
-**`aria-selected` attribute**: This state is used to indicate that an element is selected. You can use this state on custom controls like a tabbed interface, a listbox, or a grid.
132
132
133
133
```html
134
134
<divrole="tablist">
@@ -138,7 +138,7 @@ There are six main categories of ARIA roles:
138
138
</div>
139
139
```
140
140
141
-
-**`aria-controls` attribute**: Used to associate an element with another element that it controls. This helps people using assistive technologies understand the relationship between the elements.
141
+
-**`aria-controls` attribute**: Used to associate an element with another element that it controls. This helps people using assistive technologies understand the relationship between the elements.
142
142
143
143
```html
144
144
<divrole="tablist">
@@ -154,7 +154,7 @@ There are six main categories of ARIA roles:
154
154
</div>
155
155
```
156
156
157
-
-**`aria-describedby` attribute**: Used to provide additional information about an element by associating it with another element that contains the information. This gives people using screen readers immediate access to the additional information when they navigate to the element. Common usage would include associating formatting instructions to a text input or an error message to an input after an invalid form submission.
157
+
-**`aria-describedby` attribute**: Used to provide additional information about an element by associating it with another element that contains the information. This gives people using screen readers immediate access to the additional information when they navigate to the element. Common usage would include associating formatting instructions to a text input or an error message to an input after an invalid form submission.
Copy file name to clipboardExpand all lines: curriculum/challenges/english/25-front-end-development/review-html/671a883163d5ab5d47145880.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -115,7 +115,7 @@ Review the concepts below to prepare for the upcoming prep exam.
115
115
type="text"
116
116
id="name"
117
117
name="name"
118
-
placeholder="e.g. Quincy Larson"
118
+
placeholder="e.g. Quincy Larson"
119
119
size="20"
120
120
minlength="5"
121
121
maxlength="30"
@@ -286,12 +286,12 @@ Review the concepts below to prepare for the upcoming prep exam.
286
286
## WAI-ARIA, Roles, and Attributes
287
287
288
288
-**WAI-ARIA**: It stands for Web Accessibility Initiative - Accessible Rich Internet Applications. It is a set of attributes that can be added to HTML elements to improve accessibility. It provides additional information to assistive technologies about the purpose and structure of the content.
289
-
-**Aria roles**: A set of predefined roles that can be added to HTML elements to define their purpose. This helps assistive technologies understand the content of the website. Examples include `role="tab"`, `role="menu"`, and `role="alert"`.
289
+
-**ARIA roles**: A set of predefined roles that can be added to HTML elements to define their purpose. This helps assistive technologies understand the content of the website. Examples include `role="tab"`, `role="menu"`, and `role="alert"`.
290
290
-**`aria-label` and `aria-labelledby` attributes**: These attributes are used to give an element a programmatic (or accessible) name, which helps assistive technology (such as screen readers) understand the purpose of the element. They are often used when the visual label for an element is an image or symbol rather than text. `aria-label` allows you to define the name directly in the attribute while `aria-labelledby` allows you to reference existing text on the page.
291
291
-**`aria-hidden` attribute**: Used to hide an element from assistive technologies such as screen readers. For example, this can be used to hide decorative images that do not provide any meaningful content.
292
292
-**`aria-expanded` attribute**: Used to convey the state of a toggle (or disclosure) feature to screen reader users.
293
293
-**`aria-live` attribute**: Used to indicate that an element's content is important enough to require that any changes to the content should be announced immediately to screen reader users. This can include status messages like updating the number of results returned from a search, or an error message displayed after an unsuccessful form submission.
294
-
-**Common Aria states**: Common Aria states include `aria-haspopup`, `aria-checked`, `aria-disabled`, and `aria-selected`. These attributes can be used to indicate the state of an element and help assistive technologies understand the content of the website.
294
+
-**Common ARIA states**: Common ARIA states include `aria-haspopup`, `aria-checked`, `aria-disabled`, and `aria-selected`. These attributes can be used to indicate the state of an element and help assistive technologies understand the content of the website.
295
295
-**`aria-controls` attribute**: Used to associate an element with another element that it controls. This helps assistive technologies understand the relationship between the elements.
296
296
-**`aria-describedby` attribute**: Used to provide additional information about an element by associating it with another element that contains the information. This helps assistive technologies understand the purpose of the element.
0 commit comments