State of the Browser, London September 2017
http://html5accessibility.com/
<input type="checkbox" id="bold">
<label for="bold">Bold</label>
details
and summary
elements<details>
<summary>Tequila...</summary>
Makes me happy!
</details>
Create a virtual copy of the browser content
Change the way screen readers interact with the browser
Allows screen readers to make accessibility API calls within the same process
Prevents screen readers from making accessibility API calls within the same process
Passes the accessibility tree from the content process back to the UI process, where screen readers can query it
Do not create a virtual copy of the browser content
Experimental JavaScript API that enables developers to modify the accessibility tree
Has landed in Chrome Canary behind the flag:
--enable-blink-features=AccessibilityObjectModel
<span id="button">Tequila!</span>
<div id="container">
Makes me happy!
</div>
var button = document.getElementById('button');
var container = document.getElementById('container');
button.setAttribute('tabindex', 0);
container.setAttribute('hidden', true);
button.accessibleNode.role = "button";
button.accessibleNode.expanded = false;
var content = new AccessibleNodeList();
content.add(container.accessibleNode);
function disclose(event) {
if(container.getAttribute('hidden')) {
button.accessibleNode.expanded = true;
button.accessibleNode.controls = content;
container.removeAttribute('hidden');
}
else {
button.accessibleNode.expanded = false;
button.accessibleNode.controls = null;
container.setAttribute('hidden', true);
}
}
button.addEventListener('click', disclose, false);
button.addEventListener('keydown', function(event) {
if (event.keyCode == 13 || event.keyCode ==32) {
disclose();
}
});