Open orion-cengage opened 2 months ago
An additional use case to address/test:
export function Example() {
const [value, setValue] = useState("");
return (
<>
<Input
errorMessage={!value && "Empty value"}
maxCount={4}
value={value}
onChange={(e) => setValue(e.target.value)}
labelText="Default Character Counter"
/>
<Button>Send</Button>
</>
);
}
CENG_3306
Docs: https://react-magma.cengage.com/version/4.3.0/api/input/
Success Criteria: https://www.w3.org/WAI/WCAG21/Understanding/name-role-value
In the Character Counter example, the character count is announced to assistive technology using an aria-live region. The character count is announced but then is immediately followed by what was typed into the input so the message could be missed.
One approach for improving this would be to leave the visual character count message where it is then to have a visually hidden aria-live region below that is announced after the user has finished typing for a short period of time.