Page 1 of 1

Checking alt text equality for the same image

Posted: Thu Oct 15, 2015 8:17 am
by Albert Wiersch
If anyone has thoughts on an accessibility check to check that "alt" text for images is the same for the same image, then please let me know. For example, if there is an apple.jpg image that is used twice on a web page, one with alt text of "an apple" and one with alt text of "an orange", then should CSE HTML Validator generate a warning about using different alt text for the same image and ask the user to check the alt text?

In some cases it would be OK to use different alt text for the same image, like if the context is different, so this wouldn't always be a problem, but it could be.

So I am not sure if a warning like this would be helpful or not. I could also make it a message (non-error and non-warning) instead of a warning.

Any thoughts or comments on this issue? Thanks.

Re: Checking alt text equality for the same image

Posted: Thu Oct 15, 2015 12:47 pm
by Lou
I would suggest a message by default, although users can change each message from a warning to a non-warning(?)

In context an apple.jpg could correctly be either alt text of "an apple" or "a fruit." Currently there is a warning for an alt text of "". I suggest a message because some work hard to get rid of all error and warning messages. This is useful for consistency of webpage content, but would not be a "programming" error.

Re: Checking alt text equality for the same image

Posted: Thu Oct 15, 2015 1:09 pm
by Albert Wiersch
Hi Lou, so you suggest a warning message by default and then let the user change it to a regular message or disable it if they want?

Oh, by the way, this check is only performed when accessibility checking is enabled.

Re: Checking alt text equality for the same image

Posted: Thu Oct 15, 2015 9:56 pm
by Lou
Well I was thinking a regular message, but I understand your confusion all my English teachers were sure I should have been in an ESL class :)

However, if this check is only on with accessibility checking enabled then I would agree a warning would be approprate. I could easily be turned off if desired.

Re: Checking alt text equality for the same image

Posted: Mon Oct 19, 2015 9:51 am
by Albert Wiersch
Great, I'll go with a warning about this, but only when accessibility checking is enabled.... and I'll limit the message to a maximum of 3 times.

Re: Checking alt text equality for the same image

Posted: Mon Oct 19, 2015 10:57 am
by Lou
I think that will be helpful.

Re: Checking alt text equality for the same image

Posted: Tue Jun 07, 2016 10:17 am
by RSteinwand
I could see where this would be helpful.

How many times have you copied an image and forgot to update the "alt" text? I know I'm guilty and there's been times I didn't notice for about a year.