Skip to content

Commit c75b86f

Browse files
committed
Addressed comments
1 parent af11931 commit c75b86f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/checks/color/color-contrast-evaluate.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ export default function colorContrastEvaluate(node, options, virtualNode) {
155155
fgColor: fgColor ? fgColor.toHexString() : null,
156156
bgColor: bgColor ? bgColor.toHexString() : null,
157157
isLargeText: !isSmallFont,
158-
textContent: visibleText ? visibleText.slice(0, 100) : null
158+
textContent: visibleText ? (visibleText.length <= 100 ? visibleText : visibleText.slice(0, visibleText.lastIndexOf(' ', 100) || 100)) : null
159159
}
160160
}
161161
});

0 commit comments

Comments
 (0)