Menu

1 / 2

If you want to create a button from scratch, you must first create the universe | Marco Campos Blog

Hacker News·3 months ago
#UZHJ3Eit
Reading 0:00
15s threshold

The title is a tongue-in-cheek parody of a quote from Carl Sagan (External link) .

And it ties in very well with the thought exercise we are doing today.

When we start learning about web accessibility the first thing we hear one of two things:

The first rule of ARIA is to not use ARIA.

And:

If there is a native element, use that instead of recreating the element.

But people never explain why this advice is given, and why we should not recreate things from scratch.

I’m going to try to explain why recreating some components from scratch is usually a Sisyphean task (External link) with the example of (mostly) recreating a button from scratch.

Newtonian laws of UX

Native elements have a set of expectations on their behaviour. They follow some laws of UX . (See what I did there?…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.