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: _pages/a11y-aria.md
+24-24
Original file line number
Diff line number
Diff line change
@@ -10,99 +10,99 @@ topics:
10
10
- Accessibility
11
11
---
12
12
13
-
These are opportunities to improve the usage of ARIA in your application which may enhance the experience for users of assistive technology, like a screen reader.
13
+
You don't always need `aria-` attributes in your application for it to be accessible. When you do use `aria-` attributes follow these recommendations to make sure they are helpful.
14
14
15
15
## Contains
16
16
17
-
### `[aria-*]` attributes match their roles
17
+
##[aria-*] attributes match their roles
18
18
19
19
Each ARIA `role` supports a specific subset of `aria-*` attributes. Mismatching these invalidates the `aria-*` attributes. [Learn how to match ARIA attributes to their roles](https://dequeuniversity.com/rules/axe/4.10/aria-allowed-attr).
20
20
21
-
###Uses ARIA roles only on compatible elements
21
+
## Uses ARIA roles only on compatible elements
22
22
23
23
Many HTML elements can only be assigned certain ARIA roles. Using ARIA roles where they are not allowed can interfere with the accessibility of the web page. [Learn more about ARIA roles](https://dequeuniversity.com/rules/axe/4.10/aria-allowed-role).
24
24
25
-
### `button`, `link`, and `menuitem` elements have accessible names
25
+
##button, link, and menuitem elements have accessible names
26
26
27
27
When an element doesn't have an accessible name, screen readers announce it with a generic name, making it unusable for users who rely on screen readers. [Learn how to make command elements more accessible](https://dequeuniversity.com/rules/axe/4.10/aria-command-name).
28
28
29
-
###ARIA attributes are used as specified for the element's role
29
+
## ARIA attributes are used as specified for the element's role
30
30
31
31
Some ARIA attributes are only allowed on an element under certain conditions. [Learn more about conditional ARIA attributes](https://dequeuniversity.com/rules/axe/4.10/aria-conditional-attr).
32
32
33
-
###Deprecated ARIA roles were not used
33
+
## Deprecated ARIA roles were not used
34
34
35
35
Deprecated ARIA roles may not be processed correctly by assistive technology. [Learn more about deprecated ARIA roles](https://dequeuniversity.com/rules/axe/4.10/aria-deprecated-role).
36
36
37
-
###Elements with `role="dialog"` or `role="alertdialog"` have accessible names.
37
+
## Elements with role="dialog" or role="alertdialog" have accessible names.
38
38
39
39
ARIA dialog elements without accessible names may prevent screen readers users from discerning the purpose of these elements. [Learn how to make ARIA dialog elements more accessible](https://dequeuniversity.com/rules/axe/4.10/aria-dialog-name).
40
40
41
-
### `[aria-hidden="true"]` is not present on the document `<body>`
41
+
##[aria-hidden="true"] is not present on the document <body>
42
42
43
43
Assistive technologies, like screen readers, work inconsistently when `aria-hidden="true"` is set on the document `<body>`. [Learn how `aria-hidden` affects the document body](https://dequeuniversity.com/rules/axe/4.10/aria-hidden-body).
44
44
45
-
### `[aria-hidden="true"]` elements do not contain focusable descendents
45
+
##[aria-hidden="true"] elements do not contain focusable descendents
46
46
47
47
Focusable descendents within an `[aria-hidden="true"]` element prevent those interactive elements from being available to users of assistive technologies like screen readers. [Learn how `aria-hidden` affects focusable elements](https://dequeuniversity.com/rules/axe/4.10/aria-hidden-focus).
48
48
49
-
###ARIA input fields have accessible names
49
+
## ARIA input fields have accessible names
50
50
51
51
When an input field doesn't have an accessible name, screen readers announce it with a generic name, making it unusable for users who rely on screen readers. [Learn more about input field labels](https://dequeuniversity.com/rules/axe/4.10/aria-input-field-name).
52
52
53
-
###ARIA `meter` elements have accessible names
53
+
## ARIA meter elements have accessible names
54
54
55
55
When a meter element doesn't have an accessible name, screen readers announce it with a generic name, making it unusable for users who rely on screen readers. [Learn how to name `meter` elements](https://dequeuniversity.com/rules/axe/4.10/aria-meter-name).
56
56
57
-
###ARIA `progressbar` elements have accessible names
57
+
## ARIA progressbar elements have accessible names
58
58
59
59
When a `progressbar` element doesn't have an accessible name, screen readers announce it with a generic name, making it unusable for users who rely on screen readers. [Learn how to label `progressbar` elements](https://dequeuniversity.com/rules/axe/4.10/aria-progressbar-name).
60
60
61
-
###Elements use only permitted ARIA attributes
61
+
## Elements use only permitted ARIA attributes
62
62
63
63
Using ARIA attributes in roles where they are prohibited can mean that important information is not communicated to users of assistive technologies. [Learn more about prohibited ARIA roles](https://dequeuniversity.com/rules/axe/4.10/aria-prohibited-attr).
64
64
65
-
### `[role]`s have all required `[aria-*]` attributes
65
+
##[role]s have all required [aria-*] attributes
66
66
67
67
Some ARIA roles have required attributes that describe the state of the element to screen readers. [Learn more about roles and required attributes](https://dequeuniversity.com/rules/axe/4.10/aria-required-attr).
68
68
69
-
###Elements with an ARIA `[role]` that require children to contain a specific `[role]` have all required children.
69
+
## Elements with an ARIA `[role]` that require children to contain a specific `[role]` have all required children.
70
70
71
71
Some ARIA parent roles must contain specific child roles to perform their intended accessibility functions. [Learn more about roles and required children elements](https://dequeuniversity.com/rules/axe/4.10/aria-required-children).
72
72
73
-
### `[role]`s are contained by their required parent element
73
+
##[role]s are contained by their required parent element
74
74
75
75
Some ARIA child roles must be contained by specific parent roles to properly perform their intended accessibility functions. [Learn more about ARIA roles and required parent element](https://dequeuniversity.com/rules/axe/4.10/aria-required-parent).
76
76
77
-
### `[role]` values are valid
77
+
##[role] values are valid
78
78
79
79
ARIA roles must have valid values in order to perform their intended accessibility functions. [Learn more about valid ARIA roles](https://dequeuniversity.com/rules/axe/4.10/aria-roles).
80
80
81
-
###Elements with the `role=text` attribute do not have focusable descendents.
81
+
## Elements with the role=text attribute do not have focusable descendents.
82
82
83
83
Adding `role=text` around a text node split by markup enables VoiceOver to treat it as one phrase, but the element's focusable descendents will not be announced. [Learn more about the `role=text` attribute](https://dequeuniversity.com/rules/axe/4.10/aria-text).
84
84
85
-
###ARIA toggle fields have accessible names
85
+
## ARIA toggle fields have accessible names
86
86
87
87
When a toggle field doesn't have an accessible name, screen readers announce it with a generic name, making it unusable for users who rely on screen readers. [Learn more about toggle fields](https://dequeuniversity.com/rules/axe/4.10/aria-toggle-field-name).
88
88
89
-
###ARIA `tooltip` elements have accessible names
89
+
## ARIA tooltip elements have accessible names
90
90
91
91
When a tooltip element doesn't have an accessible name, screen readers announce it with a generic name, making it unusable for users who rely on screen readers. [Learn how to name `tooltip` elements](https://dequeuniversity.com/rules/axe/4.10/aria-tooltip-name).
92
92
93
-
###ARIA `treeitem` elements have accessible names
93
+
## ARIA treeitem elements have accessible names
94
94
95
95
When a `treeitem` element doesn't have an accessible name, screen readers announce it with a generic name, making it unusable for users who rely on screen readers. [Learn more about labeling `treeitem` elements](https://dequeuniversity.com/rules/axe/4.10/aria-treeitem-name).
96
96
97
-
### `[aria-*]` attributes have valid values
97
+
##[aria-*] attributes have valid values
98
98
99
99
Assistive technologies, like screen readers, can't interpret ARIA attributes with invalid values. [Learn more about valid values for ARIA attributes](https://dequeuniversity.com/rules/axe/4.10/aria-valid-attr-value).
100
100
101
-
### `[aria-*]` attributes are valid and not misspelled
101
+
##[aria-*] attributes are valid and not misspelled
102
102
103
103
Assistive technologies, like screen readers, can't interpret ARIA attributes with invalid names. [Learn more about valid ARIA attributes](https://dequeuniversity.com/rules/axe/4.10/aria-valid-attr).
104
104
105
-
###ARIA IDs are unique
105
+
## ARIA IDs are unique
106
106
107
107
The value of an ARIA ID must be unique to prevent other instances from being overlooked by assistive technologies. [Learn how to fix duplicate ARIA IDs](https://dequeuniversity.com/rules/axe/4.10/duplicate-id-aria).
Copy file name to clipboardexpand all lines: _pages/a11y-audio-video.md
+1-4
Original file line number
Diff line number
Diff line change
@@ -10,11 +10,8 @@ topics:
10
10
- Accessibility
11
11
---
12
12
13
-
These are opportunities to provide alternative content for audio and video. This may improve the experience for users with hearing or vision impairments.
14
13
15
-
## Contains
16
-
17
-
### `<video>` elements contain a `<track>` element with `[kind="captions"]`
14
+
## `<video>` elements contain a `<track>` element with `[kind="captions"]`
18
15
19
16
When a video provides a caption it is easier for deaf and hearing impaired users to access its information. [Learn more about video captions](https://dequeuniversity.com/rules/axe/4.10/video-caption).
Copy file name to clipboardexpand all lines: _pages/a11y-best-practices.md
+4-6
Original file line number
Diff line number
Diff line change
@@ -10,19 +10,17 @@ topics:
10
10
- Accessibility
11
11
---
12
12
13
-
These items highlight common accessibility best practices.
13
+
Accessibilty can be improved by passing the following tests:
14
14
15
-
## Contains
16
-
17
-
### The document does not use `<meta http-equiv="refresh">`
15
+
## The document does not use <metahttp-equiv="refresh">
18
16
19
17
Users do not expect a page to refresh automatically, and doing so will move focus back to the top of the page. This may create a frustrating or confusing experience. [Learn more about the refresh meta tag](https://dequeuniversity.com/rules/axe/4.10/meta-refresh).
20
18
21
-
### `[user-scalable="no"]` is not used in the `<meta name="viewport">` element and the `[maximum-scale]` attribute is not less than 5.
19
+
##[user-scalable="no"] is not used in the <metaname="viewport"> element and the [maximum-scale] attribute is not less than 5.
22
20
23
21
Disabling zooming is problematic for users with low vision who rely on screen magnification to properly see the contents of a web page. [Learn more about the viewport meta tag](https://dequeuniversity.com/rules/axe/4.10/meta-viewport).
24
22
25
-
###Touch targets do not have sufficient size or spacing.
23
+
## Touch targets do not have sufficient size or spacing.
26
24
27
25
Touch targets with sufficient size and spacing help users who may have difficulty targeting small controls to activate the targets. [Learn more about touch targets](https://dequeuniversity.com/rules/axe/4.10/target-size).
Copy file name to clipboardexpand all lines: _pages/a11y-color-contrast.md
+3-5
Original file line number
Diff line number
Diff line change
@@ -10,15 +10,13 @@ topics:
10
10
- Accessibility
11
11
---
12
12
13
-
These are opportunities to improve the legibility of your content.
13
+
Content legibility can be improved by passing the following audits:
14
14
15
-
## Contains
16
-
17
-
### Background and foreground colors have a sufficient contrast ratio
15
+
## Background and foreground colors have a sufficient contrast ratio
18
16
19
17
Low-contrast text is difficult or impossible for many users to read. [Learn how to provide sufficient color contrast](https://dequeuniversity.com/rules/axe/4.10/color-contrast).
20
18
21
-
###Links are distinguishable without relying on color.
19
+
## Links are distinguishable without relying on color.
22
20
23
21
Low-contrast text is difficult or impossible for many users to read. Link text that is discernible improves the experience for users with low vision. [Learn how to make links distinguishable](https://dequeuniversity.com/rules/axe/4.10/link-in-text-block).
Copy file name to clipboardexpand all lines: _pages/a11y-language.md
+5-7
Original file line number
Diff line number
Diff line change
@@ -10,23 +10,21 @@ topics:
10
10
- Accessibility
11
11
---
12
12
13
-
These are opportunities to improve the interpretation of your content by users in different locales.
13
+
Follow these recommendations to improve the experience for visitors who may take advantage of translations.
14
14
15
-
## Contains
16
-
17
-
### `<html>` element has a `[lang]` attribute
15
+
## <html> element has a [lang] attribute
18
16
19
17
If a page doesn't specify a `lang` attribute, a screen reader assumes that the page is in the default language that the user chose when setting up the screen reader. If the page isn't actually in the default language, then the screen reader might not announce the page's text correctly. [Learn more about the `lang` attribute](https://dequeuniversity.com/rules/axe/4.10/html-has-lang).
20
18
21
-
### `<html>` element has a valid value for its `[lang]` attribute
19
+
##<html> element has a valid value for its [lang] attribute
22
20
23
21
Specifying a valid [BCP 47 language](https://www.w3.org/International/questions/qa-choosing-language-tags#question) helps screen readers announce text properly. [Learn how to use the `lang` attribute](https://dequeuniversity.com/rules/axe/4.10/html-lang-valid).
24
22
25
-
### `<html>` element has an `[xml:lang]` attribute with the same base language as the `[lang]` attribute.
23
+
##<html> element has an [xml:lang] attribute with the same base language as the [lang] attribute.
26
24
27
25
If the webpage does not specify a consistent language, then the screen reader might not announce the page's text correctly. [Learn more about the `lang` attribute](https://dequeuniversity.com/rules/axe/4.10/html-xml-lang-mismatch).
28
26
29
-
### `[lang]` attributes have a valid value
27
+
##[lang] attributes have a valid value
30
28
31
29
Specifying a valid [BCP 47 language](https://www.w3.org/International/questions/qa-choosing-language-tags#question) on elements helps ensure that text is pronounced correctly by a screen reader. [Learn how to use the `lang` attribute](https://dequeuniversity.com/rules/axe/4.10/valid-lang).
Copy file name to clipboardexpand all lines: _pages/a11y-names-labels.md
+14-16
Original file line number
Diff line number
Diff line change
@@ -10,59 +10,57 @@ topics:
10
10
- Accessibility
11
11
---
12
12
13
-
These are opportunities to improve the semantics of the controls in your application. This may enhance the experience for users of assistive technology, like a screen reader.
13
+
Enhance your application's usability for visitors using screen readers by following these recommendations:
14
14
15
-
## Contains
16
-
17
-
### Buttons have an accessible name
15
+
## Buttons have an accessible name
18
16
19
17
When a button doesn't have an accessible name, screen readers announce it as "button", making it unusable for users who rely on screen readers. [Learn how to make buttons more accessible](https://dequeuniversity.com/rules/axe/4.10/button-name).
20
18
21
-
###Document has a `<title>` element
19
+
## Document has a <title> element
22
20
23
21
The title gives screen reader users an overview of the page, and search engine users rely on it heavily to determine if a page is relevant to their search. [Learn more about document titles](https://dequeuniversity.com/rules/axe/4.10/document-title).
24
22
25
-
###No form fields have multiple labels
23
+
## No form fields have multiple labels
26
24
27
25
Form fields with multiple labels can be confusingly announced by assistive technologies like screen readers which use either the first, the last, or all of the labels. [Learn how to use form labels](https://dequeuniversity.com/rules/axe/4.10/form-field-multiple-labels).
28
26
29
-
### `<frame>` or `<iframe>` elements have a title
27
+
##<frame> or <iframe> elements have a title
30
28
31
29
Screen reader users rely on frame titles to describe the contents of frames. [Learn more about frame titles](https://dequeuniversity.com/rules/axe/4.10/frame-title).
32
30
33
-
###Image elements have `[alt]` attributes
31
+
## Image elements have [alt] attributes
34
32
35
33
Informative elements should aim for short, descriptive alternate text. Decorative elements can be ignored with an empty alt attribute. [Learn more about the `alt` attribute](https://dequeuniversity.com/rules/axe/4.10/image-alt).
36
34
37
-
###Image elements do not have `[alt]` attributes that are redundant text.
35
+
## Image elements do not have [alt] attributes that are redundant text.
38
36
39
37
Informative elements should aim for short, descriptive alternative text. Alternative text that is exactly the same as the text adjacent to the link or image is potentially confusing for screen reader users, because the text will be read twice. [Learn more about the `alt` attribute](https://dequeuniversity.com/rules/axe/4.10/image-redundant-alt).
40
38
41
-
###Input buttons have discernible text.
39
+
## Input buttons have discernible text.
42
40
43
41
Adding discernable and accessible text to input buttons may help screen reader users understand the purpose of the input button. [Learn more about input buttons](https://dequeuniversity.com/rules/axe/4.10/input-button-name).
44
42
45
-
### `<input type="image">` elements have `[alt]` text
43
+
##<inputtype="image"> elements have [alt] text
46
44
47
45
When an image is being used as an `<input>` button, providing alternative text can help screen reader users understand the purpose of the button. [Learn about input image alt text](https://dequeuniversity.com/rules/axe/4.10/input-image-alt).
48
46
49
-
###Form elements have associated labels
47
+
## Form elements have associated labels
50
48
51
49
Labels ensure that form controls are announced properly by assistive technologies, like screen readers. [Learn more about form element labels](https://dequeuniversity.com/rules/axe/4.10/label).
52
50
53
-
###Links have a discernible name
51
+
## Links have a discernible name
54
52
55
53
Link text (and alternate text for images, when used as links) that is discernible, unique, and focusable improves the navigation experience for screen reader users. [Learn how to make links accessible](https://dequeuniversity.com/rules/axe/4.10/link-name).
56
54
57
-
### `<object>` elements have alternate text
55
+
##<object> elements have alternate text
58
56
59
57
Screen readers cannot translate non-text content. Adding alternate text to `<object>` elements helps screen readers convey meaning to users. [Learn more about alt text for `object` elements](https://dequeuniversity.com/rules/axe/4.10/object-alt).
60
58
61
-
###Select elements have associated label elements.
59
+
## Select elements have associated label elements.
62
60
63
61
Form elements without effective labels can create frustrating experiences for screen reader users. [Learn more about the `select` element](https://dequeuniversity.com/rules/axe/4.10/select-name).
64
62
65
-
###Skip links are focusable.
63
+
## Skip links are focusable.
66
64
67
65
Including a skip link can help users skip to the main content to save time. [Learn more about skip links](https://dequeuniversity.com/rules/axe/4.10/skip-link).
Copy file name to clipboardexpand all lines: _pages/a11y-navigation.md
+5-7
Original file line number
Diff line number
Diff line change
@@ -10,23 +10,21 @@ topics:
10
10
- Accessibility
11
11
---
12
12
13
-
These are opportunities to improve keyboard navigation in your application.
13
+
Improve accessibility by following these recommendations:
14
14
15
-
## Contains
16
-
17
-
### `[accesskey]` values are unique
15
+
## [accesskey] values are unique
18
16
19
17
Access keys let users quickly focus a part of the page. For proper navigation, each access key must be unique. [Learn more about access keys](https://dequeuniversity.com/rules/axe/4.10/accesskeys).
20
18
21
-
###The page contains a heading, skip link, or landmark region
19
+
## The page contains a heading, skip link, or landmark region
22
20
23
21
Adding ways to bypass repetitive content lets keyboard users navigate the page more efficiently. [Learn more about bypass blocks](https://dequeuniversity.com/rules/axe/4.10/bypass).
24
22
25
-
###Heading elements appear in a sequentially-descending order
23
+
## Heading elements appear in a sequentially-descending order
26
24
27
25
Properly ordered headings that do not skip levels convey the semantic structure of the page, making it easier to navigate and understand when using assistive technologies. [Learn more about heading order](https://dequeuniversity.com/rules/axe/4.10/heading-order).
28
26
29
-
###No element has a `[tabindex]` value greater than 0
27
+
## No element has a [tabindex] value greater than 0
30
28
31
29
A value greater than 0 implies an explicit navigation ordering. Although technically valid, this often creates frustrating experiences for users who rely on assistive technologies. [Learn more about the `tabindex` attribute](https://dequeuniversity.com/rules/axe/4.10/tabindex).
0 commit comments