The textimage_image theme function does not have a default alt text but it can easily be set from the text variable. Every image should have an alt tag for seo and accessibility purposes anyway so I see no reason not to have the text as a default if the alt text not set explicitly?
You could do this by replacing the following line in textimage.module (function theme_textimage_image)
return theme('image', $path, $alt, $title, $attributes, $getsize);
with:
return theme('image', $path, $alt ? $alt : check_plain($text), $title, $attributes, $getsize);
Comments
Comment #1
not_Dries_Buytaert commentedI understand your use-case, also for disabled people. However, this feature should be optional and disabled by default. A common use-case of this module is to prevent content from being indexed/ harvested, like email addresses or other valuable content.
Comment #2
Everett Zufelt commentedSpeaking as a completely blind web developer, I cannot express the frustration of encountering necessary information that has been embedded within an image. This type of practice (without providing an appropriate alt attribute), makes it more difficult for certain "disabled people" to fully participate in society and the economy and should not be followed.
Comment #3
not_Dries_Buytaert commentedAgain; I fully agree (for the same reasons) that automatically serving alt text should be possible.
However, there also exist specific use-cases (like I explained before) where it is absolutely NOT beneficial to automatically serve alt text.
Therefor, I suggested that this feature becomes OPTIONAL.
This maybe a workaround: http://drupal.org/node/672592#comment-3335824
BTW: English is not my native language. So, I am sorry if I (unintentionally) insulted anyone by using the words "disabled people" (instead of e.g. "visually impaired/ challenged").
Comment #4
Everett Zufelt commentedI think that optional is a good idea, since people should be free to choose. However, the default should be to use the imagetext as the alt attribute, ensuring that developers are intentional about their choice to obscure the data. Along with this, documentation can be added to inform developers that if they choose to obscure the text that they will need to provide alternative methods of accessing the content for users who do not have access to the image.
Comment #5
Jeff Burnz commentedThis would be a very great feature to have - I think to be optional is a fair compromise as long as its quite obvious and has a good description of why you might want to have it turned on.
Comment #6
not_Dries_Buytaert commentedOk. By default enabled alt text is fine with my, if the help text/ documentation explains the use and consequences of both values.
Comment #7
Jeff Burnz commentedCrosspost...
Comment #8
not_Dries_Buytaert commentedWe all agreed that it should be optional.
Comment #9
Everett Zufelt commentedI think we have all agreed that it should be optional. I am unclear if we have all agreed with what the default option should be. My preference is that imagetext is alt text by default.
Comment #10
markwittens commentedI think the main purpose of the module is serving text in a non-web enabled font so I think by default the alt text should be filled. If someone wants to use it for data obscuring he/she can turn it off manually.
Comment #11
mgiffordThis should be looked at in the D7 or D8 version to see if it is still a problem.
Comment #12
mondrake