Do I need to move focus on the previously hidden, but revealed with clicking/touching on the link, div
? I'll explain it by following example:
HTML:
<a href="javascript:void(0)">content</a>
<div>blablabla</div>
CSS:
div {
display:none;
width: 500px;
height:200px;
line-height: 200px;
background: #007;
color: #fff;
text-align: center;
}
.block {
display:block;
}
a:focus {
border: 2px solid red;
}
jQuery:
$(function () {
$("a").on("click touchstart", function () {
$("div").addClass("block");
});
});
As you can see, the focus is remained on the link when it's clicked. Do I actually need to remove the focus to the revealed div
? If so, should I tabindex
it? Would be nice to see any examples(not necessarily, of course) of you as well, so it would be more clear of how should it be done.