Sha256: 40c5d9e702d324217616b01a70ecb6a7d9fa266257f9816e602913a601bfbe0b

Contents?: true

Size: 664 Bytes

Versions: 15

Compression:

Stored size: 664 Bytes

Contents

/**
 * Improves the accessibility of the callout messages for screen readers. Not
 * all screen readers would announce the callout alert contents after the page
 * reload without this.
 */
((exports) => {
  exports.$(() => {
    const $callout = exports.$('.callout[role="alert"]:first');
    if ($callout.length > 0) {
      exports.setTimeout(() => {
        // The content insertion is to try to hint some of the screen readers
        // that the alert content has changed and needs to be announced.
        $callout.attr("tabindex", "0").focus().html(`${$callout.html()} `);
        // console.log("CALLOUT DONE");
      }, 500);
    }
  });
})(window);

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
decidim-core-0.24.3 app/assets/javascripts/decidim/callout.js.es6
decidim-core-0.23.6 app/assets/javascripts/decidim/callout.js.es6
decidim-core-0.24.2 app/assets/javascripts/decidim/callout.js.es6
decidim-core-0.23.5 app/assets/javascripts/decidim/callout.js.es6
decidim-core-0.24.1 app/assets/javascripts/decidim/callout.js.es6
decidim-core-0.24.0 app/assets/javascripts/decidim/callout.js.es6
decidim-core-0.24.0.rc2 app/assets/javascripts/decidim/callout.js.es6
decidim-core-0.23.4 app/assets/javascripts/decidim/callout.js.es6
decidim-core-0.24.0.rc1 app/assets/javascripts/decidim/callout.js.es6
decidim-core-0.23.3 app/assets/javascripts/decidim/callout.js.es6
decidim-core-0.23.2 app/assets/javascripts/decidim/callout.js.es6
decidim-core-0.23.1 app/assets/javascripts/decidim/callout.js.es6
decidim-core-0.23.1.rc1 app/assets/javascripts/decidim/callout.js.es6
decidim-core-0.23.0 app/assets/javascripts/decidim/callout.js.es6
decidim-core-0.22.0 app/assets/javascripts/decidim/callout.js.es6