Prior to the 2008 Presidential election, Obama did not always observe "flag etiquette". On April 16, 2008, at an event in Indianola, Iowa, Senator Obama was photographed and videotaped (see link below) as the sole person on the platform not holding his hand over his heart while the National Anthem was being played. However, he did stand "in reverence of the flag" which is customary.
The implication was that failing to display the proper hand-over-heart etiquette proved Obama was unpatriotic and unfit to hold the office of President.
Some speculated that it was an intentional gesture of dissent on the candidate's part, to which an Obama spokesperson replied -
"Sometimes he does, sometimes he doesn't [put his hand on his heart]. In no way was he making any sort of statement, and any suggestion to the contrary is ridiculous."
This may be the case or it may not be the case. Although, we are not speaking of any average Joe Smith, we are speaking of the President of the United States of America; the sole leader, role model, and representation for the entire American nation. As such, The US President should ALWAYS recite the pledge of allegiance properly and stand tall in honor of the flag.
Whether Barack Obama meant to do it intentionally or unintentionally only he knows, but no one will argue the fact that as President of the USA failing to salute the flag or pledge of allegiance is disrespectful.
The Pledge of Allegiance and National Anthem: http://www.usflag.org/flagetiquette.html
The pledge of allegiance should be rendered by standing at attention, facing the flag, and saluting. When the national anthem is played or sung, citizens should stand at attention and salute at the first note and hold the salute through the last note. The salute is directed to the flag, if displayed, otherwise to the music.
The Salute
To salute, all persons come to attention. Those in uniform give the appropriate formal salute.
Citizens not in uniform salute by placing their right hand over the heart and men with head cover should remove it and hold it to left shoulder, hand over the heart. Members of organizations in formation salute upon command of the person in charge.
Flag Etiquette is not law but custom. Whether one salutes, places their hand over their heart, stands there respectfully, or does not, is neither illegal nor is it improper. It should be noted that as President-Elect, Obama did observe flag etiquette by saluting, as would be expected of elected national leaders.