Hacker News new | ask | show | jobs
by alexpetros 3 hours ago
> And that's partially because "Cancel" is pretending you're in a desktop app with desktop idioms. No real, actual person designs websites like this.

If I click "Edit" on a GitHub comment, it shows me two buttons, "Cancel" and "Update Comment." Patterns like this can be found all over the web on sites you certainly use.

> There's functionally no reason to do this. It doesn't add anything for the user, it only takes things away in the name of making it feel "more native".

There are many functional differences between buttons and links and it's not true that links are strictly more capable. Buttons, for instance, can be activated with the spacebar.

> I've been building websites for 25 years and I've literally never had this problem.

I included a link that showcases how this problem exists both in Django itself and for developers who build websites with Django.[0] This is representative of a durable, hypertext-driven, webapp design that the proposals are intended to support.

[0] https://www.djangoproject.com/weblog/2026/jul/15/supporting-...

1 comments

> If I click "Edit" on a GitHub comment, it shows me two buttons, "Cancel" and "Update Comment."

Cancel doesn't navigate. In fact, neither of them do.

> Buttons, for instance, can be activated with the spacebar.

If it's visually a link, you're not using the spacebar to activate it. If you've taken the twenty lines of css to make a button look like anything other than the default browser styles, you can add the two lines of progressive enhancement JavaScript to handle space.

> I included a link that showcases how this problem exists both in Django itself and for developers who build websites with Django.

The example the Django project calls out from the Django admin Change form is a really half-hearted example because the delete button isn't an action. It's literally a link to another page with a confirmation step. I have in my life right clicked that very link and opened it in a new tab. Moreover, there's no cosmetic benefit because they already style everything to look custom, so you're not even saving the CSS. Making that link into a button serves nobody, said as someone who maintains Django applications.

> Cancel doesn't navigate. In fact, neither of them do.

This is correct. The point of the proposal is that you should be able to implement this pattern with just navigations, and that implementing it differently doesn't change the user semantics.

> If you've taken the twenty lines of css to make a button look like anything other than the default browser styles, you can add the two lines of progressive enhancement JavaScript to handle space.

One important stakeholder for the proposal is governments and other websites that care about building accessible web experiences that work without JavaScript enabled. There are also many differences in the behaviors that can't be rectified with JavaScript (some examples are in the original article as well as the linked proposal).

While editing one GitHub comment I may be writing another. If you must, implement it as a link, but all else equal I’d prefer keeping the other state alive when canceling one comment-edit. Doing both is cool too, but people don’t typically want to implement a feature twice.