diff --git a/apiary.js b/apiary.js index 17e9856..aeb262d 100644 --- a/apiary.js +++ b/apiary.js @@ -167,9 +167,14 @@ /** * Inject values retrieved from the API into the relevant elements of the DOM. + * While dynamically writing content, set aria-busy attribute to "true" for screen-readers. */ var injectValues = function() { + var live = $('[aria-live]'); + if (live) { + live.attr('aria-busy', 'true'); + } for (var i in placeholders) { if (placeholders.hasOwnProperty(i)) { for (var j in placeholders[i]) { @@ -177,6 +182,9 @@ } } } + if (live) { + live.attr('aria-busy', 'false'); + } }; /** diff --git a/examples/domain.html b/examples/domain.html index 5bec2a9..34be5d5 100644 --- a/examples/domain.html +++ b/examples/domain.html @@ -14,11 +14,13 @@
-