Skip to content

Commit 70f597e

Browse files
author
Marcy Sutton
committed
chore: add a comment about text nodes in .visible
1 parent a0636a8 commit 70f597e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/commons/text/visible.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ text.visible = function (element, screenReader, noRecursing) {
1717
for (index = 0; index < length; index++) {
1818
child = childNodes[index];
1919

20-
if (child.actualNode.nodeType === 3) {
20+
if (child.actualNode.nodeType === 3) { // filter on text nodes
2121
nodeValue = child.actualNode.nodeValue;
2222
if (nodeValue && dom.isVisible(element.actualNode, screenReader)) {
2323
result += nodeValue;

0 commit comments

Comments
 (0)