Title: Menu flag icons cause validation errors
Last modified: August 22, 2016

---

# Menu flag icons cause validation errors

 *  Resolved [dutchdesigner](https://wordpress.org/support/users/dutchdesigner/)
 * (@dutchdesigner)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/menu-flag-icons-cause-validation-errors/)
 * The flag icons displayed in the navigation menu have <img> tags which are missing
   two properties. As a result, the code breaks when validated as xhtml ([http://validator.w3.org/](http://validator.w3.org/)).
   WordPress itself uses xhtml (see [http://codex.wordpress.org/HTML_to_XHTML](http://codex.wordpress.org/HTML_to_XHTML)),
   so that’s why I use the xhtml doctype.
 * 1. The alt attribute is missing. (Required in html 4, 5 and xhtml)
    2. The end
   tag for <img> is omitted. (Can be omitted in html 4 and 5, but not in xhtml)
 * Current output:
    <img src=”path_to_icons/fr.png”>
 * Desired output:
    <img src=”path_to_icons/fr.png” alt=”flag (fr)” /> // perhaps
   a different text inside the alt attribute
 * I did a search online as well as on this support forum, but couldn’t find any
   solutions. So I had a look into the code and found these properties to be missing
   indeed. See qtranslate_frontend.php, version 3.1, line 169 and 196, where the
   <img> tags are generated.
 * Thanks for looking into this issue! 🙂
 * [https://wordpress.org/plugins/qtranslate-x/](https://wordpress.org/plugins/qtranslate-x/)

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [John Clause](https://wordpress.org/support/users/johnclause/)
 * (@johnclause)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/menu-flag-icons-cause-validation-errors/#post-5825454)
 * The code updated. Thanks you, [@dutchdesigner](https://wordpress.org/support/users/dutchdesigner/).
 *  Thread Starter [dutchdesigner](https://wordpress.org/support/users/dutchdesigner/)
 * (@dutchdesigner)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/menu-flag-icons-cause-validation-errors/#post-5825560)
 * Wow, that was quick!
    Thanks for your help, I’m looking forward to the next release!
   🙂
 *  Thread Starter [dutchdesigner](https://wordpress.org/support/users/dutchdesigner/)
 * (@dutchdesigner)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/menu-flag-icons-cause-validation-errors/#post-5825661)
 * After uploading the newest release of qTranslate X, my site now successfully 
   validates as XHTML 1.0 Strict. Thank you! 🙂

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Menu flag icons cause validation errors’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/qtranslate-x_f9f9f9.svg)
 * [qTranslate X](https://wordpress.org/plugins/qtranslate-x/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/qtranslate-x/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/qtranslate-x/)
 * [Active Topics](https://wordpress.org/support/plugin/qtranslate-x/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/qtranslate-x/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/qtranslate-x/reviews/)

## Tags

 * [alt](https://wordpress.org/support/topic-tag/alt/)
 * [flag](https://wordpress.org/support/topic-tag/flag/)
 * [img](https://wordpress.org/support/topic-tag/img/)
 * [validation](https://wordpress.org/support/topic-tag/validation/)

 * 3 replies
 * 2 participants
 * Last reply from: [dutchdesigner](https://wordpress.org/support/users/dutchdesigner/)
 * Last activity: [11 years, 3 months ago](https://wordpress.org/support/topic/menu-flag-icons-cause-validation-errors/#post-5825661)
 * Status: resolved