The Instant View Editor uses a three-column layout, so you really want to use it on a desktop screen that's wide enough. Sorry for the inconvenience.

Back to the main page »



Link Preview

Issue #1

Missing captions.
It is possible to reliably identify image captions.

In the source:
<img data-caption="CAPTION TEXT">

If p/@data-caption=p/text(),
then replace <p> with <figure> and wrap ./text() in <figcaption>

In practice, it is implemented a little more difficult.
It is necessary to convert @ data-caption to text before comparison. You can also check if <p> have other children.
It works great in my template.

The solution is reliable because:
1. Where there is no signature to the image, it will not be in IV.
Despite the fact that the text is in @data-caption
2. If the paragraph contains another text (not a figcaption) - it will not be lost
3. It is hardly possible to imagine a situation when this approach does not work.
Pavel T.
Scripts on this site do nothing with @data-caption. You can check them all and try to find something like you do.
Every image in news section has @data-caption attr and it never used.

This text is close to the image only because they're in the same pararaph. There are no CSS-rules for captions.

So, here we can see only simple paragraph with text & image. Doing a job you did is unnecessary because even site's owner haven't do it.
Declined by admin
While I agree that checking if text after an image matches image's @data-caption should work robust for such cases, I reject this issue, because:
- I was unable to find any other page with the same formatting
- I was also unable to find any usages of @data-caption attribute in the page sources & scripts
- @data-caption seems to be completely unused by the website
- On all other pages contains only some junk
- On the source page it does not completely look like a caption.
Type of issue
IV page is missing essential content
Mar 29, 2019