Skip to content

Add rel=edit attribute to "Suggest an edit" link #2702

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 14, 2025

Conversation

capjamesg
Copy link
Contributor

This PR adds the rel="edit" attribute to the "Suggest an edit" edit link.

rel=edit lets a page indicate that the linked resource can be used to edit the page. It is defined at https://microformats.org/wiki/rel-edit. This can then be parsed by tools like the Universal Edit Button and custom bookmarklets to open the edit page corresponding with a website.

@rustbot rustbot added the S-waiting-on-review Status: waiting on a review label May 14, 2025
@ehuss
Copy link
Contributor

ehuss commented May 30, 2025

Thanks, looks like the tests are failing, though.

@notriddle or @GuillaumeGomez are you familiar with rel="edit"? Does this seem like something worth adding?

@GuillaumeGomez
Copy link
Member

Hum, not 100% sure it's ok (although I think it's fine). This button is to suggest an edit whereas the rel=edit docs say:

Tells the browser the URL for editing the current page

So not exactly the same but it's nitpicking here. Let's see if @notriddle has another opinion but I think it's ok.

@notriddle
Copy link
Contributor

So not exactly the same but it's nitpicking here.

The Microformats wiki page links to the Suprabase Docs as a positive example, and they're using rel=edit to link to a GitHub editor page just like this PR proposes.

That seems like a positive endorsement of the practice. I'm fine with this change.

Copy link
Contributor

@ehuss ehuss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@ehuss ehuss enabled auto-merge July 14, 2025 21:59
rel=edit lets a page indicate that the linked resource can be used to
edit the page. It is defined at https://microformats.org/wiki/rel-edit.
This can then be parsed by tools like the Universal Edit Button and
custom bookmarklets to open the edit page corresponding with a website.
@ehuss ehuss added this pull request to the merge queue Jul 14, 2025
Merged via the queue into rust-lang:master with commit e152e19 Jul 14, 2025
14 checks passed
@rustbot rustbot removed the S-waiting-on-review Status: waiting on a review label Jul 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants