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

For u- properties, consider parsing the containing tag #57

Open
dshanske opened this issue Aug 13, 2022 · 2 comments
Open

For u- properties, consider parsing the containing tag #57

dshanske opened this issue Aug 13, 2022 · 2 comments

Comments

@dshanske
Copy link
Member

Specifically, if a u- property is on an img, video, or audio tag. should this information be parsed into the final JSON? Identifying images, video, and audio seems a common use case and would address people incorrectly using u-photo for this.

@gRegorLove
Copy link
Member

What would the proposed parsed result look like for this? What is the use-case that it's solving?

@dshanske
Copy link
Member Author

This would look simialr to https://microformats.org/wiki/microformats2-parsing#parse_an_img_element_for_src_and_alt

https://microformats.org/wiki/microformats2-parsing#parsing_a_u-_property

It notes:
else if img.u-x[src] return the result of "parse an img element for src and alt" (see Sec.1.5)
else if audio.u-x[src] or video.u-x[src] or source.u-x[src] or iframe.u-x[src], then get the src attribute
else if video.u-x[poster], then get the poster attribute

Elsewhere, we proposed if the element has a non-empty id attribute, add the string value of element's id attribute as an id property. So, here this could add 'mime-type': 'image', for example. This would be consistent with srcset and source properties we have yet to decide how to address.

But the practical use case for me is u-featured. Right now, I want to be able to identify that the featured media in an article or otherwise is an image, video, or audio...unless we are limiting u-featured as a draft proposal to images only.

Maybe this is the first use case for the long proposed h-media microformat?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants