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
When the page loads, the character counts are not announced, which is the correct behavior.
It could be possible that the live regions are announced so often is because of how javascript applications refresh content when the state updates. This isn't happening in USWDS source component because it is used on a static HTML page.
Expected behavior
Character counts should only be announced when interacting with the text area
Screenshots
Additional context
Device and Browser Information (please complete the following information if describing a UI bug):
The text was updated successfully, but these errors were encountered:
Spent time testing this and confirmed a couple of things:
This behavior is specific to Storybook, which loads the component in an iframe. When inspecting with react dev tools in Chrome, I noticed that specifically the div with the aria-live attribute renders twice inside storybook. I then spun up a sandbox react app and imported the component there to re-test, and confirmed that the component behaves as expected.
Upgrading storybook resolves the issue entirely.
I recommend prioritizing updating the storybook version as the fix for this issue and closing updating #2917 to remove the changes to CharacterCount
ReactUSWDS Version & USWDS Version:
Describe the bug
On pages using the CharacterCount, screen readers announce the character counts even when not interacting with the text area.
To Reproduce
Steps to reproduce the behavior:
It could be possible that the live regions are announced so often is because of how javascript applications refresh content when the state updates. This isn't happening in USWDS source component because it is used on a static HTML page.
Expected behavior
Character counts should only be announced when interacting with the text area
Screenshots
Additional context
Device and Browser Information (please complete the following information if describing a UI bug):
The text was updated successfully, but these errors were encountered: