This issue is spun off from #2831274-390: Bring Media entity module to core as Media module, specifically this point of review:
Twig templates use ? https://developer.mozilla.org/en-US/docs/Web/HTML/Element/article - I don't think that media items should wrapped in that.
phenaproxima: Open to suggestions here, but not sure what a more appropriate tag would be.
seanB: It’s either this, or a plain old div I believe. I think perfectly described that a media item is a ‘self-contained composition in a document’ and ‘independently distributable or reusable’.
alexpott: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/article the aria roles that are related really do not make me think this is at all related to what is in media and when you put a media entity on a node using entity reference it's going to be wrapped in article tags - inside another article - seems weird.
This is postponed on #2831274: Bring Media entity module to core as Media module.
Comment | File | Size | Author |
---|---|---|---|
#3 | 2878115-3.patch | 721 bytes | marcoscano |
Comments
Comment #2
phenaproxima#2831274: Bring Media entity module to core as Media module has landed, so this is no longer postponed.
Comment #3
marcoscanoAny problems with a plain old div?
Comment #4
phenaproximaI have no problem with a DIV, personally...although, given the nature of media, figure might be a more appropriate tag? Should we get front-end maintainer review?
Comment #5
Tess BakkerI would be nice to use the same conditions and maybe options as in https://api.drupal.org/api/drupal/core%21modules%21node%21templates%21no... but in default it shows only the fields from the view mode.
As for the wrapper tag, I would choose DIV instead of ARTICLE, most of the time the entity will be included inside a node.
Comment #6
phenaproxima@Tessa Bakker: Adding more variables to the template is certainly debatable, but outside the scope of this issue :)
For a wrapper tag, I have seen no evidence that anyone objects to a plain DIV. I'm marking this RTBC.
Comment #7
starshapedI think a DIV is fine here. +1 RTBC :)
Comment #9
Gábor HojtsyIt is definitely not an article. Since it may be a video or an image or a document, we cannot say its a figure either. So a div seems most safe to use.