Open dshanske opened 2 years ago
What would the proposed parsed result look like for this? What is the use-case that it's solving?
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?
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.