umbraco-accessibility-reporter icon indicating copy to clipboard operation
umbraco-accessibility-reporter copied to clipboard

feat: Cross Domain iFrame using postMessage API

Open tkjaergaard opened this issue 8 months ago • 1 comments

Hi,

This package is fantastic! We're exclusively using headless websites with Umbraco, and spinning up a Puppeteer cloud function can sometimes feel excessive.

Cross Domain iFrame communication is actually possible.

References:

The idea is to use the postMessage API for communication between the backoffice and the iframe.

On the client side of the site to analyze the user has to:

  • Detect to load the Axe library - maybe a query parameter that instructs the site to load the library?
  • Load an accessibility-reporter library to facilitate postMessage API communication. This could essentially also load the Axe library and be served through a CDN or as a NPM package?

This approach could make the Azure Function redundant in many cases, resulting in faster reporting in the backoffice.

tkjaergaard avatar Jun 13 '24 06:06 tkjaergaard