diff --git a/packages/react/src/components/TextArea/TextArea.tsx b/packages/react/src/components/TextArea/TextArea.tsx index 81236abd643b..0dc3c1f95676 100644 --- a/packages/react/src/components/TextArea/TextArea.tsx +++ b/packages/react/src/components/TextArea/TextArea.tsx @@ -459,7 +459,12 @@ const TextArea = React.forwardRef((props: TextAreaProps, forwardRef) => { )} {input} {normalizedSlug} - + {ariaAnnouncement} {isFluid &&
} diff --git a/packages/react/src/internal/useAnnouncer.js b/packages/react/src/internal/useAnnouncer.js index 94e787a4b6b5..24b3e00bdd45 100644 --- a/packages/react/src/internal/useAnnouncer.js +++ b/packages/react/src/internal/useAnnouncer.js @@ -7,6 +7,9 @@ export function useAnnouncer(textCount, maxCount, entityName = 'characters') { const lastTen = maxCount - 10; + if (textCount == maxCount) { + return `Maximum ${entityName} reached.`; + } if (textCount >= lastTen) { return `${maxCount - textCount} ${entityName} left.`; }