ARIA’s role=link
can be used to create a link from almost any HTML element.
The developer is responsible to create a keyboard and mouse interface. And also style the element to look like a link. TabIndex=0 will put the new link into the tab order, but a keyboard handler needs to be created that will accomplish the following:
- Tab moves focus to the Link. A second tab moves focus to the next focusable item.
- Space or Enter executes the link.
- Shift+F10 is used to bring up an associated Popup Menu.
JAWS announces this as a link
Example 1:
tabindex="0"style="text-decoration: underline"
onkeyup = "ARIA_Role_Key(event,'http://www.websiteaccessibility.com');"
onclick="alert('URL = http://www.websiteaccessibility.com');"
>
This is a div using the ARIA
role=link
attribute.
Code
function ARIA_Role_Key(event,URL) { if((event.keyCode == 13) || (event.keyCode == 32)){ alert("URL = " + URL); } } This is a div using the ARIArole=link
attribute.