aria-notify-iframe-manual-test.html (810B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <title>ARIA Notify iframe Manual Test</title> 5 </head> 6 <body> 7 <script> 8 'use strict'; 9 10 function testAriaNotify() { 11 const resultDiv = document.getElementById('result'); 12 const urlParams = new URLSearchParams(window.location.search); 13 const message = urlParams.get('message') || 'Default announcement message'; 14 15 if (!document.ariaNotify) { 16 resultDiv.textContent = 'ariaNotify API is not supported in this browser'; 17 return; 18 } 19 20 // Check if the feature is allowed by permissions policy 21 document.ariaNotify(message); 22 resultDiv.textContent = `ariaNotify called with message: "${message}"`; 23 } 24 </script> 25 <button onclick="testAriaNotify()">Make Announcement</button> 26 <div id="result"></div> 27 28 </body> 29 </html>