Opened 3 years ago
Last modified 2 years ago
#6187 new defect (bug)
Photo Directory: oembed title is illegible
Reported by: | sarayourfriend | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Component: | Photo Directory | Keywords: | |
Cc: |
Description
The oembed title currently being used is the photo ID. This makes oembeds look bad with an illegible title.
Example from https://wordpress.org/photos/photo/254622bb60/:
<meta property="og:title" content="254622bb60">
The description being used is the "title" that you can add when submitting. Should submitters be allowed to submit a title and a description/caption? It'd be nice if the description was also used for suggested alt text.
I've attached a screenshot of what this looks like using the Gutenberg embed block.
Attachments (1)
Change History (7)
#3
@
3 years ago
@hilayt24 reproduction steps for which part? The oembed/opengraph tags are visible in the markup of any photo landing page like the one I linked.
To reproduce the Gutenberg embed block, just paste a Photo Directory link into Gutenberg (even the one at https://wordpress.org/gutenberg will do this) and you'll see an example of how the current tags are not the best case.
They're better than what was reported in #6015 for sure, but the title is the first thing, for example, a screen reader will see when they enter into an oembed element.
#4
@
3 years ago
@sarayourfriend: For context, as you indicated, the title shown is in fact the title of the photo. It is not meant to be generally meaningful, but it is indeed unique and identifying. The input field when submitting a photo is intended as the caption, which is largely how it is currently used. (At present in some context, we do use the caption as ALT text.)
The plan (see #6173) is to ultimately add a separate field for ALT text.
Other than as the page title for single photo pages, titles aren't used or displayed (though they can be searched for).
Is there benefit to adding a third input and having contributors supply another value? It does increase the onus on moderators to assess and potentially provide or improve a title.
I would instead favor using the caption (or an excerpt of it if it is too long) as the og:title
rather than specifically asking for a title.
I fear separately asking for a title would mean it'd often be left blank (if allowed), or specified in place of providing a caption, or be the same text in both places.
I also wonder if we'd complicate things by separately asking for title, caption, and ALT and needing to explain what those mean and possibly how/where they're used. (Because WP asks for these and more when adding images to the media gallery doesn't necessarily mean people understand it there any better or would properly specify each of the values.)
Some questions I have:
- Using the provided photo as an example, would "Green Moth" as the title with "Green Moth" as the caption (i.e. being repeated) be better than showing the generated title? My suggested approach (using the caption or its excerpt as the
og:title
would result in this. (A screenreader reading the generated title is certainly not great, but duplicate text read back-to-back isn't great either.) - Should the
<meta property="description">
and<meta property="og:description">
be omitted to prevent duplication of the caption text when used as theog:title
, or would doing so negatively affect SEO and/or screen reader experience? - Should/could we just omit the
og:title
for photos and leave everything else as-is? - What if a caption is not provided? Currently it is optional, and though both contributors and moderators are encouraged to provide one, it is not currently enforced and thus not guaranteed. In such a scenario, we have no basis for generating a meaningful title unless we require moderators to manually provide one.
#5
@
3 years ago
Thanks for the additional context.
I understand that there's hesitation to add more fields to fill out. I do think that with the photo directory aiming to be a repository of high quality, curated, CC0 images, it's not a huge hurdle to ask submitters to spend a few extra minutes submitting alt text, a title and an optional caption.
I think rather than omitting the description, which would look very odd on most embed blocks on websites (Twitter, LinkedIn, even WordPress), it'd be better to choose a generic description that potentially includes the "title" of the image, whatever that may be. For SEO I believe this would be helpful but I'm not sure, someone good at SEO would have to answer that, maybe @jonoalderson (not sure of his Trac handle) could help here.
We can look at what Pexels does for example, it seems like their approach is 100% doable with the current information.
https://www.pexels.com/photo/photo-of-two-pigeons-1406506/ for example.
- title is the title of the image (pattern is "{photo_title} - Free Stock Photo")
meta description
is "One of many great free stock photos from Pexels. This photo is about {tags}".- The opengraph description is "Download this photo by {author} for free on Pexels"
- The opengraph title is "Image by {author} on Pexels"
And so on. The photo directory certainly doesn't have to reinvent the wheel I don't think.
The current implementation is just confusing for users with and without screen readers. It's awkward to come across a string of seemingly random numbers and letters and a screen reader will read them out character by character verbatim.
I think it'd be safe to trust Photo Directory contributors to take the time to add the extra information if it was being used (in particular alt text, but that's already planned?). However, if just tags and the title are available, there's generic text that could be used to fill out the opengraph tags and SEO tags to fill the space and explain the content better.
Hello @sarayourfriend, Thank you for the tickedt. Can you please attach the steps for this.
Thank you