October 27th, 2020

Replying to a tweet from @hankchizljaw

I’d be interested in getting your take on the logic I’m using here: https://adactio.com/journal/17546

…generally you can’t go wrong with a button. … That said, I think that links can also make sense in certain situations.

51° N , 0° E

Also on Twitter

Reply Retweet Favourite

Responses

Andy Bell

P much nodding along with all of that: it depends being the key for sure. I’m still a fan of a button for a modal if I can, but “extending” a link isn’t the worst thing if needs be. I’m the same as you: bother Heydon with it

# Posted by Andy Bell on Tuesday, October 27th, 2020 at 4:02pm

Jeremy Keith

I like the fallback you get with a link (assuming it’s using a valid fragment identifier)—if anything goes screwy with the JavaScript, the link still works. adactio.com/notes/17565

Andy Bell

What I’ve started doing with stuff like accordions is rendering a headed group of content and passing that into something like a vue component or web component that then sucks all the content out and turns it into the interactive stuff. A thing called progressive enhancement?

# Posted by Andy Bell on Tuesday, October 27th, 2020 at 4:07pm

Evan Minto

I did exactly this recently on a project! Used hash links to control a modal and then enhanced with a WC. Button would be better tbh but to do that and keep the fallback you’d need to use role or have the WC swap out the link for a button (yuck).

# Posted by Evan Minto on Tuesday, October 27th, 2020 at 9:01pm

4 Likes

# Liked by Andy Bell on Tuesday, October 27th, 2020 at 4:14pm

# Liked by Stephen Mizell on Tuesday, October 27th, 2020 at 4:15pm

# Liked by 청설모 🎗 on Tuesday, October 27th, 2020 at 5:08pm

# Liked by Megan on Tuesday, October 27th, 2020 at 8:09pm

Have you published a response to this? :