Skip to content

Conversation

@james-work-account
Copy link
Contributor

Due to everything in the cards being divs, being able to open the cards using basic keyboard navigation isn't possible. This pull request changes interactive components into buttons, adds aria-labels to each button so screen readers will read out which card they are over, and changes the event listener to be on click so it can be triggered with a keyboard "enter" press. It also (hopefully) removes the default styling from the buttons so it doesn't look any different.

To manually check this, firstly you should be able to click/mouseover like before. Secondly, you should be able to "tab" between each card and press "enter" to open/close them.

Note that I really don't know what I'm doing with Svelte, so if I've introduced any anti-patterns then I'm happy to change them. Also, I haven't checked this change in all browsers but it seems to work at least in Chrome and Firefox on macOS.

@netlify
Copy link

netlify bot commented Oct 28, 2022

Deploy Preview for deck-24abcd ready!

Name Link
🔨 Latest commit 265f58e
🔍 Latest deploy log https://app.netlify.com/sites/deck-24abcd/deploys/635bbb0c474a4300081c799f
😎 Deploy Preview https://deploy-preview-2--deck-24abcd.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.

@simeydotme
Copy link
Owner

dude that's a pretty nice addition :)

I am about to make some changes on another branch and will try to incorporate this

@simeydotme
Copy link
Owner

Took your suggestion in the revamp branch

@simeydotme simeydotme closed this Oct 28, 2022
@james-work-account
Copy link
Contributor Author

Glad I could help!

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

Successfully merging this pull request may close these issues.

2 participants