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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

capjamesg
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: waiting on a review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants