Accessibility
type chooses paint, the icon, and the default ARIA role. The variant map is:
AlertType | Role |
|---|---|
Note | note |
Info | note |
Success | status |
Warning | status |
Error | alert |
role (note, alert, or status) to override that default. The default story expects getByRole("note") for AlertType.Note. The dismissible accessibility story uses AlertType.Error, whose role names the region, and a localized dismissTitle on the dismiss control.
aria-label names the root when the title alone is insufficient. A description is linked from the root with aria-describedby. The component prefers aria-label over aria-labelledby for the root name.