The audio module does not produce xhtml compliant output. at the very least with the line in 1pixelout.inc that reads:

The embed tag in not an xhtml tag.

So, lets make it compliant.

Comments

drewish’s picture

a patch for that that works with both Firefox, IE6 and IE7 would be committed in an instant.

zirafa’s picture

-1 for this.

Here's a case where making it XHTML compliance will hurt us. Technically it's not correct to use an embed tag, but notice that we are also using an object tag. The combination of embed + object ensure that the flash player will show up in any situation. It's such an edge case I think covering our bases is much more important than validation.

It is even recommended by w3schools:
http://www.w3schools.com/flash/flash_inhtml.asp

Note: In the code above there is both an <embed> tag and an <object> tag. This is because the <object> tag is recognized by Internet Explorer, and Netscape recognizes the <embed> tag and ignores the <object> tag.

zirafa’s picture

Actually, you could do some switching logic to show embed or object tags based on browser. Either server side or client side would probably work. It still wouldn't validate in explorer, but that is explorer's fault.

drewish’s picture

here's a nice summary of the various problems: http://www.alistapart.com/articles/flashembedcagematch

mfer’s picture

I guess the question is, do we continue flash player support for Netscape 4 and 5? That's why the embed tag would be used.

drewish’s picture

mfer, we probably cross posted, but take a look at that article i linked to, it's not really that simple.

mfer’s picture

@drewish, I read the article (good call) and learned a lot. It's more complicated than I originally thought. The embed tag goes way back in usage so it will support some really old browsers. Yet, I know from my site stats that I don't get anyone that doesn't support the object tag.

This is an area I am personally torn on. Give up compliance and support more people or comply and some people get left out. I think I would rebel from compliance for now. Yet, I reserve the right to change my mind at any point.

andykemp’s picture

I am using a combination of removing the embed tag, and using SWFObject. This way SWFObject handles putting the flash in (also removing the anoying click to activate thing in IE), and will add the embed tag when needed, but the code then passes the XHTML Strict verification. For me this is the best of both worlds as the code passes the compliance test, but is still backwards compatible for any computer that allows javascript.

Maybe we could go for something like this as a solution? I'm not sure if it is officially complaint (as SWFObject will add the embed tag), but it does seem to pass the test!

mgifford’s picture

The a list apart article ultimately points to http://code.google.com/p/swfobject/

So, this does seem to be the best approach to this problem.

drewish’s picture

Version: 5.x-2.x-dev » 6.x-1.x-dev

marked #248326: XHTML Validation errors as a duplicate. bumping to the current version.

yan’s picture

No advances on this issue, right? Still getting validation errors...

HorsePunchKid’s picture

What browsers at this point don't support the object tag in the way that these players use it? Just IE6? Netscape? Mosaic? Can we just drop the embed tag from each player.inc and call it fixed?

If not, could we have an admin setting that gives you the choice between compliance and IE6 support?

powery’s picture

Correct this issue, please

kosh.g’s picture

I would also like to see a xhtml compliant audio module. It's a pitty to have a site fully compliant and just one module that ruins compliance. Especially when it is an excellent module such as audio.

I'm using this module extensively on my web site.

lewie6’s picture

also needed... i get about 6 errors when trying to validate on w3c