3 ms·
If this particular thing of clicking everything but the title is really a thing, nothing is blocking you to add some minimal JavaScript which « onclick » on the
by pjerem 6y ago
If this particular thing of clicking everything but the title is really a thing, nothing is blocking you to add some minimal JavaScript which « onclick » on the item div element, triggers a click on the link. Add some « cursor: pointer » in you Stylesheet and you are done.
It’s literally 2 loc, it doesn’t affect accessibility and it’s using JavaScript for what it was meant : adding some optional convenience.
I realize I’ve not done real server rendered sites for years, but adding good old « optional convenience » JS without jQuery and broken browsers, but with ES6, modules, and maybe WebComponents would probably be a really pleasant experience.
- ehnto 6y agoYes you are right, that's a good approach. Another commenter linked a great article on accessibility and "card" style content which also recommended that approach, worth a read as it discusses a lot of the caveats and your approach tackles the majority of the issues you can encounter.