pcottle / learnGitBranching

An interactive git visualization and tutorial. Aspiring students of git can use this app to educate and challenge themselves towards mastery of git!
https://pcottle.github.io/learnGitBranching/
MIT License
30.4k stars 5.74k forks source link

Accessibility: Level links are now links #1030

Closed ulyssear closed 1 year ago

ulyssear commented 1 year ago

Part of issue #960

Replaced div elements to links with "#" as href value. I checked on my side, no problem has been created with this modification.

netlify[bot] commented 1 year ago

Deploy Preview for xenodochial-hugle-b9ec84 ready!

Name Link
Latest commit fbbd04c96aa66976193f98323112ba672db540f3
Latest deploy log https://app.netlify.com/sites/xenodochial-hugle-b9ec84/deploys/63516ac0319ead0009e144a6
Deploy Preview https://deploy-preview-1030--xenodochial-hugle-b9ec84.netlify.app/
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

pcottle commented 1 year ago

Alright I tested as well and looks like everything is functional. I'm trying to be a bit more cautious/safe with these accessibility PRs given that some browsers didn't support the other ones, but anchor tags are pretty standard.

The only weird thing is that you can middle-click the level links now, and it opens up a new tab with just the #: https://deploy-preview-1030--xenodochial-hugle-b9ec84.netlify.app/#

thoughts on that? I actually think it would be awesome if we could customize the link target to be a command that launches just that level, like so: https://learngitbranching.js.org/?NODEMO&command=level%20intro3

ulyssear commented 1 year ago

The only weird thing is that you can middle-click the level links now, and it opens up a new tab with just the #: https://deploy-preview-1030--xenodochial-hugle-b9ec84.netlify.app/#

Oh, it's true the # does not prevent new tabs to be opened, the value javascript:void(0) can be set instead.

thoughts on that? I actually think it would be awesome if we could customize the link target to be a command that launches just that level, like so: https://learngitbranching.js.org/?NODEMO&command=level%20intro3

I like the idea, but we have to find something to prevent the page from loading just to run commands if the user is already on learngitbranching. I think we can create a new issue to talk about this.

pcottle commented 1 year ago

Ok cool, could we switch to the JavaScript void then? Just so the new tab behavior isn't rough around the edges

pcottle commented 1 year ago

works great! thanks a bunch