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: docs/topics/code/accessible-name/index.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,7 +20,7 @@ A proper accessible name for HTML elements is essential for screen reader users
20
20
21
21
Abdulqudus Abubakre gives an excellent, detailed writeup of the accessible name [Understanding Accessible Names in HTML](https://dev.to/ibn_abubakre/understanding-accessible-names-in-html-562).
22
22
23
-
{: .info }
23
+
{: .callout .info }
24
24
Note: An `aria-label` attribute on a link or a button overrides all textual content within.
25
25
For example, the accessible name of the button `<button aria-label="Close">Open</button>` is "Close".
26
26
@@ -59,7 +59,7 @@ The accessibility tree of Chrome shows the following relevant information: the a
59
59
- Focused: true
60
60
- Expanded: false
61
61
62
-
{: .info }
62
+
{: .callout .info }
63
63
In this example the accessible name is taken from "Contents". The other options are not specified. An accessible name can be overwritten. Here the different steps for defining an accessible name are shown and sorted in order of the computation. A value for the `aria-label` will overwrite the Contents value.
64
64
65
65

Copy file name to clipboardExpand all lines: docs/topics/content/links/link-text.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,7 @@ nav_order: 2
11
11
This content will be reviewed, restructured and expanded.
12
12
Related issue on [GitHub #110 Topic Write a meaningful link text](https://github.com/wpaccessibility/wp-a11y-docs/issues/110).
13
13
14
-
{: .tip }
14
+
{: .callout .tip }
15
15
**Rule of thumb**: a link text should describe the resource that it links to, so that when the text is read out of context the user will still know what to expect. A link is a promise, not a surprise.
16
16
17
17
Link text should stand on its own. Some assistive software scans a page for links and presents them to the user as a simple list. In these situations, all the links will be read out of context. So it is important the text used in a link is descriptive and meaningful.
@@ -34,11 +34,11 @@ With these types of links, users have to read the whole sentence to understand t
34
34
<figcaption>Useless, non-descriptive link text in the Apple VoiceOver link list.</figcaption>
35
35
</figure>
36
36
37
-
{: .dont}
37
+
{: .callout .dont}
38
38
Poor qualify (non-descriptive) link texts:
39
39
If you are interested in our work, [click here](#dummy-link) to subscribe to our newsletter. You can [download](#dummy-link) the manual of the espresso machine, or contact us for more [info](#dummy-link).
40
40
41
-
{: .do }
41
+
{: .callout .do }
42
42
Helpful (descriptive) link texts:
43
43
[Subscribe to our newsletter](#dummy-link) if you are interested in our work. You can download the [manual as a PDF]((#dummy-link)) of the espresso machine, or [contact us](#dummy-link) for more info.
44
44
@@ -61,11 +61,11 @@ Sequences of all capital letters are harder to read for people with dyslexia, sc
61
61
62
62
Some URLs are highly readable, such as “wordpress.org”. Others are almost impossible to parse as language. In most cases, you should avoid using a URL as the visible link text. If you are explicitly referring to a web address, keep it short: [wordpress.org](https://www.wordpress.org) instead of [https://www.wordpress.org](https://www.wordpress.org).
63
63
64
-
{: .dont}
64
+
{: .callout .dont}
65
65
Poor quality (non-descriptive) link texts:
66
66
If you are interested in our work, [click here](#dummy-link) to subscribe to our newsletter. You can [download](#dummy-link) the manual of the espresso machine, or contact us for more [info](#dummy-link).
67
67
68
-
{: .do}
68
+
{: .callout .do }
69
69
Helpful (descriptive) link texts:
70
70
[Subscribe to our newsletter]((#dummy-link)) if you are interested in our work. You can download the [manual as a PDF]((#dummy-link)) of the espresso machine, or [contact us](#dummy-link) for more info.
Copy file name to clipboardExpand all lines: docs/topics/forms/input-label/accessible-name.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -110,7 +110,7 @@ Visual text or equivalent, like a search icon, should always be visible, so sigh
110
110
111
111
If you must hide a label or control from vision, use the CSS class [`.screen-reader-text`](https://make.wordpress.org/accessibility/handbook/best-practices/markup/the-css-class-screen-reader-text/) or equivalent.
112
112
113
-
{: .dont }
113
+
{: .callout .dont }
114
114
Don't use the CSS `display: none`, `visibility: hidden` or the HTML attribute `hidden` on a label, as that also removes the element, and its accessible name, from the accessibility tree.
115
115
116
116
```html
@@ -127,7 +127,7 @@ Don't use the CSS `display: none`, `visibility: hidden` or the HTML attribute `h
127
127
<button>Search</button>
128
128
```
129
129
130
-
{: .do }
130
+
{: .callout .do }
131
131
Always add a visible hint about how to fill out the form field.
132
132
<labelfor="search-text"class="screen-reader-text">Search this website</label>
0 commit comments