11. POSH
• If it’s an action element that triggers a navigation
to another page or another section on the same
page
—> it’s a Link! <a href=“somewhere-else”>
12. POSH
• Any other action
—> it’s a Button! <button>Action!</button>
22. Keyboard support
function a11yClick(event){
if(event.type === 'click'){
return true;
}
else if(event.type === 'keypress'){
var code = event.charCode || event.keyCode;
if((code === 32)|| (code === 13)){
return true;
}
}
else{
return false;
}
}
$('#fake-button').on('click keypress', function(event){
if(a11yClick(event) === true){
// do stuff
}
});
Karl Groves: http://dir.kg/a11yClick
23. 4. ngAria
“The goal of ngAria is to improve Angular's default accessibility by enabling
common ARIA attributes that convey state or semantic information for assistive
technologies used by persons with disabilities.”