Consider reverting "feat(GlAlert): Add support for hiding variant icon"
The following discussion from !2784 (merged) should be addressed:
-
@jeldergl started a discussion: (+4 comments) @kushalpandya and @ntepluhina I'd like to discuss reverting this change if possible. There wasn't a UX or Foundations review here and this breaks from Pajamas alert documentation where an icon is required.
Removing the icon has both UX and accessibility considerations. For example, since alerts can be spawned from multiple templates, we can often have multiple alerts present for a user and potentially having some with icons and others without creates an inconsistency in the UI. In regards to accessibility, we're using the icon to help infer the alert meaning, removing it means we're relying on color, which isn't reliable for every user and then it comes down to the text itself for a user to discern the type of alert, if they even recognize it as an alert since we have other sections of the UI that can get a background color like this. I realize the color argument can be fuzzy since the content within should be able to provide meaning, but I don't count on this always being the case and it'd be better to be more explicit.
If the change is still desired, it'd be great to work through it using the component lifecycle. I did look at the original design request and don't think it should use an alert to begin with and instead could use utility classes to style the static content. An alert should be announced to a user or provide something to act upon, and I don't think the use case requires either. More considerations for alert use in &7538 (comment 837885210).
/cc @gitlab-org/ecosystem-stage/foundations