WebPlatformForEmbedded / WPEWebKit

WPE WebKit port (downstream)
213 stars 136 forks source link

Fix Voice Guidance reads iframe when added to DOM #1206

Closed filipe-norte-red closed 11 months ago

filipe-norte-red commented 11 months ago

Backported from: https://github.com/WebPlatformForEmbedded/WPEWebKit/pull/820

Example test page:

<html>
   <head />
   <body bgcolor="white">
   <script>

      setTimeout(()=> {
         var tgt = document.getElementById("tgt");
         var iframe = document.createElement("iframe");
         iframe.src = "https://a11yphl.com";
         iframe.height = "0";
         iframe.width = "0";
         iframe.title = "My iframe";

         console.log("XXXXXXXXXXXXXXXXXXXXXXX Appending iframe...");
         tgt.appendChild(iframe);
         console.log("XXXXXXXXXXXXXXXXXXXXXXX Appending iframe...DONE");
      },4000)

   </script>
      <p>Hello world</p>
      <div id="tgt"></div>
   </body>
</html>