If i use a anchor tag in my asp.net mvc 2 web app how can i make sure the user can ‘tab’ to it in case he is just using his keyboard?
I use something like this but it is not accessible?
<a id="someanchor">Upload statement</a>
$("#someanchor").click(function () {
//some js
});
how to create an anchor tag that is accesible?
You need an href – without one, the anchor is considered to be a non-interactive placeholder.
In this case, the href is present, so the A ends up being a tabbable link and can be activated via keyboard, but the target URL – javascript:void(0) – is basically a no-op, so no actual navigation occurs.