.agents/skills/accessibility/references/components/callouts.md
EuiCallOut and announceOnMountApplies to: EuiCallOut
A callout that appears conditionally (validation, async result, toggle, post-submit feedback) is invisible to assistive technology unless you opt into EUI's live-region behavior.
condition && <…>, ternary, branches, early return) → set announceOnMount so the callout is announced when it mounts.announceOnMount; it does not need a live region.announceOnMount={false} and document why in the callsite if non-obvious.title, body) → i18n.translate (see Localization (i18n) in ../shared_principles.md).If EuiCallOut uses {...calloutProps} and announceOnMount is not on the opening tag, merge it at the callsite or in the spread source.
Conditional
{hasError && (
<EuiCallOut
announceOnMount
title={i18n.translate('form.errorTitle', { defaultMessage: 'Error' })}
color="danger"
>
{errorMessage}
</EuiCallOut>
)}
Explicit opt-out
{decorativeCondition && (
<EuiCallOut announceOnMount={false} title="…">
…
</EuiCallOut>
)}
// WRONG — conditional callout without announceOnMount
{hasError && <EuiCallOut title="Error" color="danger" />}
// RIGHT
{hasError && <EuiCallOut announceOnMount title="Error" color="danger" />}
// WRONG — unnecessary on a static callout
<EuiCallOut announceOnMount title="Note" color="primary" />