Make WordPress Core

Opened 4 months ago

Last modified 2 months ago

#59006 new defect (bug)

No title attribute on oEmbed and REST API <link>s

Reported by: edent's profile edent Owned by:
Milestone: 6.5 Priority: normal
Severity: normal Version: 6.2.2
Component: Embeds Keywords: has-screenshots has-patch has-unit-tests
Focuses: accessibility, rest-api Cc:


By default, WordPress adds three <link rel="alternate" ... to the <head> of every post.

These are missing the title="..." attribute. This means that some browsers will announce the links as "alternate" with no explanation of their destination - see screenshot attached.

The three links are:

<link rel="alternate" type="application/json" href="" />
<link rel="alternate" type="application/json+oembed" href="" />
<link rel="alternate" type="text/xml+oembed" href=";format=xml" />

Ideally, these would have title="JSON", title="oEmbed (JSON)", title="oEmbed (XML)" or similar.

Attachments (1)

Screenshot from 2023-08-08 19-05-44.png (34.9 KB) - added by edent 4 months ago.
Lynx browser showing the "alternate" link.

Download all attachments as: .zip

Change History (10)

4 months ago

Lynx browser showing the "alternate" link.

This ticket was mentioned in Slack in #accessibility by joedolson. View the logs.

4 months ago

#2 @kadamwhite
3 months ago

@TimothyBlynJacobs @rmccue Do you see any reason not to do this? I assume we'd want to translate the title strings

#3 @TimothyBlynJacobs
3 months ago

Yeah seems fine to add. I was unaware lynx was still a thing :)

This ticket was mentioned in PR #5080 on WordPress/wordpress-develop by addisonhardy.

3 months ago

  • Keywords has-patch has-unit-tests added

This PR makes three changes:

Note: The Trac ticket referenced below does not include a consensus discussion around this change. Opening the PR as a proof of concept as part of familiarizing w/ the WP development process as a new contributor at WordCamp US 2023.

Trac ticket:

#5 @kadamwhite
3 months ago

@TimothyBlynJacobs Do you think these "title" strings should be translatable?

@TimothyBlynJacobs commented on PR #5080:

3 months ago

Maybe @SergeyBiryukov has some thoughts on localization. My inclination would be that we should still translate it.

This ticket was mentioned in Slack in #accessibility by joedolson. View the logs.

2 months ago

@joedolson commented on PR #5080:

2 months ago

I'm inclined to think these should be translated, although it does feel a little strange. At least in the case of oEmbed (XML), I think that the structure and order of the text could be variable by language, which is enough to justify it, to me.

#9 @joedolson
2 months ago

  • Milestone changed from Awaiting Review to 6.5

I think this is worth doing, even though it probably only applies in a very small number of cases. A little clarity doesn't hurt!

Note: See TracTickets for help on using tickets.