DEV Community

Discussion on: Web Accessibility learned, the hard way...

Collapse
 
itzsrikanth profile image
itzsrikanth

Thanks a tonne @inhuofficial for your support 🙏.
As next task, I was trying to find a way to trigger a onclick on a button using Voiceover. It works using mouse click only. Can you please help me on this?

Collapse
 
grahamthedev profile image
GrahamTheDev

Sure, are you using an inline onclick on the button or addEventListener('click'.

Also are you using a framework or is this vanilla (as a lot of frameworks break the native functionality of "click")

Thread Thread
 
itzsrikanth profile image
itzsrikanth

We are using addEventListener in Vanilla JS

Thread Thread
 
grahamthedev profile image
GrahamTheDev

Hmm sorry to be all "stack overflow" about it but do you have a fiddle that replicates this? A click handler will work on a native <button> without issue unless there is something else interfering.

Also is your VoiceOver on Mac or Mobile just so I know which to test with!

Thread Thread
 
itzsrikanth profile image
itzsrikanth

Yeah sure. I will try to replicate the issue in fiddle and share the link soon. Thanks in advance for your quick responses :-)

Thread Thread
 
grahamthedev profile image
GrahamTheDev

No problem, anyone working on accessibility is a super star in my book so I will help when I can! ❤️