Difference between revisions of "ARIA Relevant property"

From Level Access Web Labs
Jump to navigation Jump to search
Line 22: Line 22:
 
   <button onclick="removals();"> Test Removals </button>
 
   <button onclick="removals();"> Test Removals </button>
 
</html>
 
</html>
 +
 
==Additions==
 
==Additions==
 
[[Category:ARIA]]
 
[[Category:ARIA]]
 +
<html>
 +
  <head>
 +
    <script type="text/javascript">
 +
      var i = 1;
 +
      function removals() {
 +
        var bl_a = document.getElementById('bl_a');
 +
        var d = document.createElement('div');
 +
        d.textContent = "Friend" + i;
 +
        i++;
 +
        bl_a.appendChild(node);
 +
      }
 +
    </script>
 +
  </head>
 +
  <div><b>Buddy List:</b></div>
 +
  <div aria-live="polite" aria-relevant="additions" id="bl_a" style="padding: .5em; width:5em; border:thin solid;">
 +
    <div id="e1">Bill</div>
 +
    <div id="e2">Jack</div>
 +
    <div id="e3">Peaches</div>
 +
  </div>
 +
  <button onclick="removals();"> Test Additions </button>
 +
</html>

Revision as of 17:23, 9 April 2014

  • aria-relevant uses a list of space separated possible values: removals, additions, text, or a single "all".

Removals

Buddy List:
Bill
Jack
Peaches

Additions

Buddy List:
Bill
Jack
Peaches