img() - html validation error - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=22) +--- Thread: img() - html validation error (/showthread.php?tid=22354) |
img() - html validation error - El Forum - 09-06-2009 [eluser]bgougent[/eluser] since some time I need to add alt tags to my image for a blind user. When I use the default img() function in the html_helper I always get an error on the missing alt tag. So I deceided to change the html_helper with my own html_helper file (application/helpers) This is the code Code: <?php if (!defined('BASEPATH')) exit('No direct script access allowed'); I've added a third parameter 'alt'. If nothing is mentioned the alt is set - still empty. If definied I have a correct alt tag. Both are correct for the HTML validator . img() - html validation error - El Forum - 09-06-2009 [eluser]Johan André[/eluser] Whats wrong with extending the html-helper? (name it MY_html_helper.php and place in application/helpers). img() - html validation error - El Forum - 09-06-2009 [eluser]InsiteFX[/eluser] Hi, For one that I can see you need to change this: Code: from: Incorrect This also applys to Input and meta tags. Enjoy InsiteFX |