Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Middle-click usability issue with clickable cards #4

Closed
wargaluk opened this issue Dec 27, 2022 · 6 comments
Closed

Middle-click usability issue with clickable cards #4

wargaluk opened this issue Dec 27, 2022 · 6 comments

Comments

@wargaluk
Copy link

Hi @madrilene! Thanks for your truly amazing and inspiring work on Eleventy Excellent. I'm using a heavily modified and adapted version of it on my website FigCat (you are credited on the About page).

I noticed an issue with Heydon Pickering's "redundant click event" solution for making the whole area of cards clickable (without sacrificing the ability to select text). When a card is middle-clicked (as in to open a new tab in a desktop browser), the link is opened in the current tab instead. I tested this on Firefox and Chromium.

I'm a heavy middle-clicker myself and I found this tremendously frustrating, so on my site I reverted to the pure CSS "pseudo-content trick" (also from Inclusive Components).

Unfortunately, I'm not knowledgeable enough to suggest a JavaScript alternative that would be guaranteed to work in all contexts and remain accessible.

@madrilene
Copy link
Owner

Wow, that site is awesome! May I add it to the 'built with' section? Also, I'll look into the redundant click matter once all the holiday meetups are over! 😬

@wargaluk
Copy link
Author

That's a huge compliment coming from you, but all the awesomeness is really due to the solid base provided by your exceptional starter. Let me just say that discovering it single-handedly convinced me to try my hand at Eleventy and web development in general after about 15 years hiatus (I used to be very enthusiastic about the original web standards movement as a teenager, but then bounced off when the web became frameworks upon frameworks and absurdly nested divs with non-semantic classes). I bought access to Every Layout some time ago but it was too high-level for me to start anything on my own.

I'd be honored if you included my site in the readme, although perhaps it would be best to note that it's quite heavily customized (I wouldn't like to give any newcomers the wrong idea about the features included in your starter).

I'm sure I noticed some other minor kinks when adapting the code, so I might add another issue or two in the near future – but please, don't let it spoil your holiday / New Year season!!

@madrilene
Copy link
Owner

No worries, just send me everything you find, I'm happy about it!

As for this issue: Heydon's JavaScript solution has this drawback that the context menu no longer works as expected. I haven't found a solution for this yet, and after looking at other possibilities for this trick, it still seems like the best solution so far.

Here are some other possibilities explored, you might be interested in this: codepen.io/fgeierst/full/vYymQVG

@madrilene
Copy link
Owner

Keeping redundant click solution as is ftm

@madrilene
Copy link
Owner

Hey @wargaluk, after talking to Nicolas Hoizey on Mastodon I decided to go with Heydon's pseudo-content trick solution, just like you did. Just as an update! :)

@wargaluk
Copy link
Author

I'm glad that my raising of this issue was helpful after all! I hope that all the avid right- and middle-clickers of the world will now join me in celebration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants