by rambambram · 3y ago · 0 comments
<img title='Jim Nielsen'/> anyone?
For making apps on the web, I abide to the request/response cycle that's inherent to HTTP. JS is only for cropping images, picking colors and other necessary functionality that adds to the otherwise serverside monolith.
Of course there are use cases where one needs a JS framework, but I think it would surprise a lot of devs to see what's possible with just HTML, CSS and a little bit of JS on the client side. Although that seems to require a big mindshift nowadays...
I wish the browsers would enable their "behind-a-flag" support for masonry so many sites could then remove another chunk of JavaScript being used for layout.
I know some devs might see this and think "Titles are builtin in tooltips!" and unfortunately, they are not.
[0]: https://yoast.com/developer-blog/dont-rely-title-attribute/
I recommend trying not to get distracted by the example and focus on the core idea.
That's an accessibility gotcha, the title attribute tend to be neglected by screen readers and you should use aria attributes to communicate that information, and display it with other means