For the sake of people who are unable to see red, I would suggest that the default themes show a warning icon (like an ! in a circle) to the left of the warning text. If an icon would increase page load, it could also be a large ! symbol styled using CSS.

The contrast between the text and the background could also be increased, especially on Garland.

Comments

xano’s picture

+1.

We might have to make a distinction between notices/warnings and errors, though.

EvanDonovan’s picture

Component: usability » theme system
Issue tags: +Usability

Adding tag. Does anyone else think this would be worthwhile? If so, I might write a patch.

xano’s picture

There are plans to add one more status ("info") and convert "ok" to "confirmation", so before anyone starts designing it might make sense to wait for those plans first. Also, I believe triangles and not circles are internationally accepted as warning signs.

EvanDonovan’s picture

"Triangles...are internationally accepted as warning signs" - yes, I wasn't thinking. Is there an issue for adding the new statuses? If so, can you link it here & mark this as postponed?

Bojhan’s picture

Sorry, can't we do this with a icon?

xano’s picture

Title: Display ! symbol in default themes' warning messages: for people w/red color-blindness » Add icons to status messages.

That is exactly what we're talking about ;-) Might be best to add icons to all status messages for consistency and clarity.

Jeff Burnz’s picture

Issue tags: +Accessibility

tagging

cburschka’s picture

Drupal already has icons for errors, warnings and confirmations in the watchdog list - a red circle with a white X, a yellow triangle with a black exclamation mark and a green check-mark - which are also used on the modules and status pages I believe. Adding them to status messages seems easy enough (though it would really require the distinction between "ok" and "info" as the green check-mark doesn't fit for everything.).

I seem to remember seeing a blue-white "i", but I must have imagine that because I can't find it in the misc/ folder.

xano’s picture

We have #375928: Add type "info" to Drupal Messenger service for info messages already. This issue should focus on adding icons to status messages and style them properly.

EvanDonovan’s picture

"A red circle with a white X, a yellow triangle with a black exclamation mark, a green check-mark, a blue-white I" - those would be perfect. If they already exist in /misc, so much the better.

yesct’s picture

#13911: Drupal GPL icons might be related, especially if trying to get a consistant drupal look.

yesct’s picture

Re: #8 above,
Comment #3 at #13911: Drupal GPL icons has a link to the lullabot list of drupal icons that as a blue circle with a white i.

Everett Zufelt’s picture

+1 for using icons for status messages, to accompany colour.

Also see #515236: theme_status_messages needs additional markup to be more apparent to assistive technology users

mgifford’s picture

Agreed. Icons can be a huge usability improvement for an interface.

yoroy’s picture

I will pick up icon work again but hopefully that can be done post-freeze?

mcrittenden’s picture

Are we proposing that it be done on a theme level (as a CSS background image) or that the status message will actually output the icon next to it?

I'm +1 if the former, and -1 if the latter. I'd love to see it incorporated into Garland and Seven, but I want to be able to easily do my own thing on my custom themes.

Subscribe.

mgifford’s picture

It would definitely need to be easily themable. Having defaults images in Garland & Seven would help. I'd think that we could just agree to a set size of an image.

I would think that if we could get some code here and even a few place holder images that it would help frame the discussion. I do think that if we don't have some examples and concepts about how to deal with different image sizes we'll see this pushed back to D8.

Few sources for images:
- http://www.maxpower.ca/free-icons/2006/03/05/
- http://www.famfamfam.com/lab/icons/silk/
- http://commons.wikimedia.org/wiki/Crystal_Clear
- http://www.pinvoke.com/

And there's a recommendation over in the related thread (which includes the Lullabot set:
- http://drupal.org/node/13911#comment-1760804

Can someone propose either a patch or revised HTML for consideration?

Everett Zufelt’s picture

This does seem to be something that can be done post freeze.

Since theme_status_messages() now outputs headings to indicate message types this could be done with a CSS background image. However, it could also be done as an img element output by theme_status_messages() which would be overridable on a theme-by-theme basis.

sign’s picture

This is what is in RootCandy theme:

/**
 * Messages
 */
.messages, .help {
  background-repeat: no-repeat !important;
  background-position: 10px 13px !important;
  padding-left: 44px !important;
  padding-top: 10px !important;
  min-height: 37px !important;
}

.messages.status {
  background-image: url(icons/i24/status/status-info.png) !important;
}

.messages.error {
  background-image: url(icons/i24/status/status-error.png) !important;
}

.messages.warning {
  background-image: url(icons/i24/status/status-warning.png) !important;
}

Probably won't fit entirely as it is, but could be a good start?
I reckon CSS approach would be easiest and most effective

Where would be the best place to apply a css patch?

mcrittenden’s picture

IMO this should be done on a theme by theme basis. I'd vote that we don't output icons at all by default as an img element, and just let the theme add a background image and some padding-left. In other words, this patch would only touch Seven, Garland, and Minnelli, and nowhere else. Anybody else?

yoroy’s picture

Status: Active » Closed (duplicate)

I already had a feeling we were having this discussion somewhere earlier:
#193482: Styling status messages in system.css has more info, was there sooner and has actual patches and icons going, so marking this duplicate of that, let's continue over there.