in reply to Conditional regex

Converting all the IMG tags without alt text to say alt="text" disregards the spirit of the 508 (accessibility) guidelines and is kind of offensive to the visually-impaired audience they are designed to help.

Why? Hearing the screen reading software say "text" to describe every image they can't actually see isn't likely to make a user real glad you're "508 compliant".

Any meaningful fix would need somebody 'editorial' to enter descriptive text for each different image in turn (clearly a manual task rather than a coding job).

Appreciate you're probably just trying to code what you've been asked to, but you might want to do the decent thing and point out to your federal agency that this is really not helpful. You never know, if they agree then the task will be off your desk!

Replies are listed 'Best First'.
Re^2: Conditional regex
by Nkuvu (Priest) on May 08, 2009 at 21:46 UTC

    On the flip side, you could convert all alt-less image tags to say alt="Nkuvu says missing tag here!" which would allow an editor to actually go through and find the tags that need to be manually updated. Essentially highlighting the TODO sections.

    Not that I expect this is the intent in this particular scenario, but I could see using a script to find all alt-less image tags.