Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can <video> tag be within <audio> tag? (And vice versa.) #87

Closed
Zegnat opened this issue Nov 7, 2021 · 3 comments
Closed

Can <video> tag be within <audio> tag? (And vice versa.) #87

Zegnat opened this issue Nov 7, 2021 · 3 comments

Comments

@Zegnat
Copy link

Zegnat commented Nov 7, 2021

Currently the site is unsure ("I doubt") for both video as child and as parent. The correct answer to the question is a definitive no.

It looks like the site is doubting because of the transparent content model:

Because the parent <audio/> tag has the Transparent content option and the ability to nest the tag is not fully understood.

But when we read the actual content model section for these tags, we will find the following:

[...] then transparent, but with no media element descendants.

The only media elements in the HTML spec today are video and audio, see 4.8.12 Media elements. So we can definitively say that even though these elements have a transparent content model they can never be nested inside eachother.

I am not sure how this could be parsed out of the spec in an easy way. It might not be possible. But thought I would leave it here as a note anyway. Thanks for this cool project!

@CyberLight
Copy link
Owner

Hi @Zegnat !
Thank you for your feedback!
It's so cool that reviews come from those who use the site!

Based on this feedback as well as past experience and bugs, I am preparing version 2.0 in which I think I can fix the problems described in other open issues. There will be a different approach in evaluating the possibility of including a tag in a tag.

@Zegnat
Copy link
Author

Zegnat commented Nov 7, 2021

Awesome! Definitely going to keep my eyes out for the 2.0 then.

@Zegnat
Copy link
Author

Zegnat commented Dec 11, 2021

The new 2.0 shows "No, you can't!" for video elements inside audio elements and vice-versa. Closing this as fixed 🎉

@Zegnat Zegnat closed this as completed Dec 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants