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
- changing the visible-inner-text definition to treat <p> w/ "display: inline" differently. (treats it differently effectively, not explicitly.)
- adding a passed example which shows a corresponding <p> w/ "display: inline" case.
Copy file name to clipboardExpand all lines: _rules/visible-label-in-accessible-name-2ee8b8.md
+17-6Lines changed: 17 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -141,21 +141,31 @@ Similar to the previous example.
141
141
142
142
#### Passed Example 9
143
143
144
+
The [visible inner text][] of this link is "ACT" (with no spaces) because of the explicit styles of "display: inline" on the <p> elements and the absence of whitespace between the <p> elements. The cases of "display: inline" and "display: block" are handled by the definition of [visible inner text of an element][]. This example shows that the definition agrees with the visual rendering done by the browser.
The [visible inner text][] is "Download specification", which includes a space character between the two words due to the second clause of the definition of [visible inner text of a text node][].
This example shows that the [visible inner text][] isn't always the same as the [innerText][https://html.spec.whatwg.org/multipage/dom.html#the-innertext-idl-attribute]. The visible inner text is "Download specification". The innerText is 'Download \ngizmo\nspecification'. This rule uses the visible inner text - not innerText.
161
171
@@ -174,31 +184,31 @@ This example shows that the [visible inner text][] isn't always the same as the
This example passes the rule because "YYYY-MM-DD" is in brackets. Text in brackets is removed by the [label in name algorithm][], because its not normally spoken by speech-input users.
188
198
189
199
```html
190
200
<buttonaria-label="Search by date">Search by date (YYYY-MM-DD)</button>
191
201
```
192
202
193
-
#### Passed Example 14
203
+
#### Passed Example 15
194
204
195
205
The passes for two reasons: 1) because the ellipsis ("…") is [non-text content][], and 2) because the ellipsis is neither a letter nor a digit and so is filtered out by the [label in name algorithm][].
196
206
197
207
```html
198
208
<buttonaria-label="Next">Next…</button>
199
209
```
200
210
201
-
#### Passed Example 15
211
+
#### Passed Example 16
202
212
203
213
This passes because the [label in name algorithm][] effectively ignores all punctuation and emoji, in both the visible inner text and the accessible name, as long as they don't break up words.
204
214
@@ -392,6 +402,7 @@ This link has no [visible inner text][].
392
402
[visible]: #visible'Definition of visible'
393
403
[visible inner text]: #visible-inner-text'Definition of Visible inner text'
394
404
[visible inner text of a text node]: #visible-inner-text:for-text'Definition of Visible inner text of a text node'
405
+
[visible inner text of an element]: #visible-inner-text:for-element'Definition of Visible inner text of an element'
395
406
[visible text content]: #visible-text-content'Definition of Visible text content'
396
407
[whitespace]: #whitespace'Definition of Whitespace'
397
408
[widget role]: https://www.w3.org/TR/wai-aria-1.1/#widget_roles'Definition of Widget role'
Copy file name to clipboardExpand all lines: pages/glossary/visible-inner-text.md
-1Lines changed: 0 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,7 +21,6 @@ The <dfn id="visible-inner-text:for-text">visible inner text of a [text node][]<
21
21
The <dfnid="visible-inner-text:for-element">visible inner text of an [element][]</dfn> is:
22
22
- if the [element][] is not [rendered][], its visible inner text is the empty string (`""`);
23
23
- if the [element][] is a [`<br>`][<br>] element, its visible inner text is a newline character (`"\n"`);
24
-
- if the [element][] is a [`<p>`][<p>] element, its visible inner text is the concatenation a newline character (`"\n"`) plus the visible inner text of its children (in [tree order][] in the [flat tree][]), plus a newline character (`"\n"`);
25
24
- if the [computed][][`display`][display] property of the [element][] has an [outer display type][] of `block`, or an [inner display type][] of `table-caption`, the visible inner text of the [element][] is the concatenation of a newline character (`"\n"`) plus the visible inner text of its children (in [tree order][] in the [flat tree][]) plus a newline character (`"\n"`);
26
25
- if the [computed][][`display`][display] property of the [element][] has an [inner display type][] of `table-cell` or `table-row`, the visible inner text of the [element][] is the concatenation of an ASCII space character (`" "`) plus the visible inner text of its children (in [tree order][] in the [flat tree][]) plus an ASCII space character (`" "`);
27
26
- otherwise, the visible inner text of the [element][] is the concatenation of the visible inner text of its children (in [tree order][] in the [flat tree][]).
0 commit comments