Remember to always use an actual html checkbox , unless it is absolutely impossible.
You can see from this example that it takes quite a bit of work to create a fake checkbox.
To do this we need to simulate a number of things:
The NVDA and Jaws screen readers both fire the "onclick" event (instead of the onkeydown event) when user is in browse mode.
When the NVDA/Jaws user is interacting with the page using "forms" mode or "application mode", the screen reader fires the onkeydown event.
When you are coding custom checkboxes and radiobuttons; controls that screen reader users can activate without leaving browse mode; make sure that you code the onclick event to execute the same function as the onkeydown functionality.
If you wish to test how screen readers interact with the checkbox when the click event is disabled you can