<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - AX: Programmatic DOM changes are not noticed by VoiceOver"
   href="https://bugs.webkit.org/show_bug.cgi?id=166714">166714</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>AX: Programmatic DOM changes are not noticed by VoiceOver
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>WebKit
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>Safari 10
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>iPhone / iPad
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>iOS 10
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>Normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P2
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Accessibility
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>webkit-unassigned&#64;lists.webkit.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>jonathan&#64;tumult.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>webkit-bug-importer&#64;group.apple.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>If the DOM is programmatically changed, these changes are not picked up by VoiceOver.

Example Code:

=====================

&lt;div id = &quot;item1&quot;&gt;item 1 (not hidden)&lt;/div&gt;
&lt;div id = &quot;item2&quot; aria-hidden=&quot;true&quot;&gt;item 2 (hidden via HTML)&lt;/div&gt;
&lt;div id = &quot;item3&quot;&gt;item 3 (hidden via JS after 2s)&lt;/div&gt;
&lt;div id = &quot;item4&quot;&gt;item 4 (not hidden)&lt;/div&gt;

&lt;script&gt;

function changeHidden() {
    document.getElementById(&quot;item3&quot;).setAttribute(&quot;aria-hidden&quot;, &quot;true&quot;);


window.setTimeout(changeHidden, 4000);

&lt;/script&gt;

=====================

After 4 seconds, item3 should no longer be navigable via swiping left/right in voice over because it is set to aria-hidden=true. However it still is.  Some actions like double-tapping will get it to be properly hidden from navigation.

Likewise, simply changing innerHTML may have the same result:

=====================

&lt;div id = &quot;item1&quot;&gt;item 1 (not hidden)&lt;/div&gt;
&lt;div id = &quot;output&quot;&gt;&lt;/div&gt;

&lt;script&gt;

function changeOutput() {
    output.innerHTML = &quot;changed&quot;;


window.setTimeout(changeOutput, 2000);

&lt;/script&gt;

=====================

VO does not see the output div.

This affects dynamic sites, like those generated by Tumult Hype.

I am reproducing on iPad Pro with iOS 10.2.1 via:
1. Enabling VoiceOver
2. Swiping to the right</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>