[themes] Alt text with preg_replace for accessibility
Jakob Persson
jakob at jakob-persson.com
Tue Nov 7 17:57:36 UTC 2006
You need to create an anchor or what it's called, it means you can grab
a value and can refer to it later. It should work with preg regexes.
However I agree with Ross, this isn't really the job of the designer.
It's a client side feature and should be handled by the browser.
Jakob
Mark Hope wrote:
> Hi,
>
> I'm creating a text only version of a site and would like to replace
> inline images with their alt text.
>
> In my template files I have:
> <?php print preg_replace("/<img[^>]+\>/i", "(image) ", $content) ?>
>
> which replaces all images with:
> (image)
>
> what code would I need to create output like:
> (Image description: THE ALT TEXT HERE)
>
> and is this best practice?
>
> Regards
> Mark
>
> _______________________________________________
> themes mailing list
> themes at drupal.org
> http://lists.drupal.org/mailman/listinfo/themes
>
More information about the themes
mailing list