Hi! I am the #a11yParrot. 🩜👋

If a click loads a new page or view, use a link (`<a>`).
If a click changes something on the same page, use a `<button>`.

Repost this every time you have to explain links vs buttons.
(I will until the end of time).

#Accessibility #a11y

@MoritzGlantz could need a REST-Parrot. Seriously.

Lately almost everyone seems to just use POST for everything and return HTTP 200 on principle.

200 - Wrong password
200 - Resource not found
200 - Bad Gateway

đŸ˜©

@MoritzGlantz but submit buttons generally redirect to another page, and tables of contents are same-page links
 so unfortunately that isn't so simple, am I wrong? #Accessibility

@menelion I love a good edge-case.

You’re not wrong.
Better heuristic: links are for navigation to a URL (including `#fragment` in-page navigation like a TOC), buttons are for actions (including form submit). A submit *may *lead to a new page, but the user intent is “submit,” not “navigate.” It could also trigger a form validation, or add content inline (for example a comment).

@MoritzGlantz @menelion what about search buttons then
@SRAZKVT @MoritzGlantz It's also an action.
@menelion
Yes, a "search" button is just a submit button with a different name.
@SRAZKVT @MoritzGlantz
@MoritzGlantz I can't think of anything less accessible than writing accessibility as a11y....
@MoritzGlantz - at least once a week, am I right?!