Open markconroy opened 4 months ago
Are we sure callouts AND alerts should have an icons, not just alerts?
There's an argument to add them to the ones named callout danger, and callout success - however the others could be used in all sorts of ways, so I guess maybe not.
Other thoughts:
In the gov.uk pattern https://design-system.service.gov.uk/components/warning-text/ there is visually-hidden text "Warning" which will convey a similar message to non-visual users.
As we're just working with the css, we could potentially add "Warning" as content in the ::before
However, is "warning" always appropriate? Perhaps I'm overthinking this.
Related: https://github.com/localgovdrupal/localgov_base/issues/563
Given that these are wysiwyg styles, it's tricky to add the visually hidden text. I guess we could do it with JS. This might be more a feature for the alerts than the callouts though, as they are "alerts" rather than "here's a bit of info we want to make look different".
Presumably, given the intent is to convey information here, the icon should be paired to the colour/state? So an 'info' alert might have one icon, and a 'panic' alert might have another? Otherwise we're back to using colour to convey meaning without a supplemental method.
Closes #531
Here's a PR to add an icon to alerts and callouts. Just to note a few things:
Let's make sure we have these as notes in the release notes. Here's a screenshot.
=== Thanks to Big Blue Door for sponsoring my time to work on this.