Discussion
Loading...

Post

Log in
  • About
  • Code of conduct
  • Privacy
  • Users
  • Instances
  • About Bonfire
Dr. Matt Lee is at hireme.fyi
@mattl@social.coop  ·  activity timestamp last week

Made a single HTML file URL shortener. No database needed.

Let me know what you think!

https://mat.tl/s/

#indieweb #opensource #html
https://social.coop/@mattl/114950875119564602

  • Copy link
  • Flag this post
  • Block
Gadfly (-booq-)
@gaditb@icosahedron.website replied  ·  activity timestamp last week
@mattl Can I make a small suggested improvement?

A small bit of CSS to highlight the link (well, focused element) if javascript isn't enabled/available.
(I'm... pretty sure this is the :target selector, but I don't actually do webdev.)

<style> li:target { border 2px rebeccapurple } </style>

or something.

(Also I'm 90+% sure that nonvisual/screenreader displays already start reading at the fragment target, but I'm not 100% sure and I don't know how to test that.)

  • Copy link
  • Flag this comment
  • Block
Gadfly (-booq-)
@gaditb@icosahedron.website replied  ·  activity timestamp last week
@mattl Also I think a line of JS to, when you click the :after displaying the attr(id),
copies the link to clipboard.

(And... maybe changes the :after to say "copied!" before change back? To, give visual feedback? I don't know what good UI is.)
(I also don't know if you even can add an "on-click" to an :after . Although I guess if the whole li (except the a link, which already does its thing) does that, then maybe it'd work with that. Or maybe you can just do it.)

(... I also don't know how to make that accessible/annotate that capability correctly. Especially not without adding more complexity. ... but maybe if you're interaction with the Accessability Tree already, there's already a function "give me a link to what I'm focusing on"? ..but maybe not. I don't have a particular reason for it besides "why not tho". I don't know things.)

  • Copy link
  • Flag this comment
  • Block
Gadfly (-booq-)
@gaditb@icosahedron.website replied  ·  activity timestamp last week
@mattl Also yeah! This is cool. Linkdump pages that double as shortner pages. Always good to have more linkdump pages.
  • Copy link
  • Flag this comment
  • Block
Log in

bonfire.cafe

A space for Bonfire maintainers and contributors to communicate

bonfire.cafe: About · Code of conduct · Privacy · Users · Instances
Bonfire social · 1.0.0-rc.2.6 no JS en
Automatic federation enabled
  • Explore
  • About
  • Members
  • Code of Conduct