fix: length indicator aria-label should not be negative (#1454)

This commit is contained in:
Nolan Lawson 2019-08-29 20:13:25 -07:00 committed by GitHub
parent 450785ea81
commit 9787fe9f05
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -43,7 +43,7 @@
lengthToDisplay: ({ length, max }) => max - length,
lengthLabel: ({ overLimit, lengthToDisplayDeferred }) => {
if (overLimit) {
return `${lengthToDisplayDeferred} characters over limit`
return `${-lengthToDisplayDeferred} characters over limit`
} else {
return `${lengthToDisplayDeferred} characters remaining`
}