X-Git-Url: https://yaffs.net/gitweb/?a=blobdiff_plain;f=web%2Fcore%2Fmisc%2Fdetails-aria.js;h=f927ab3cb6dbe55bcb4c1cffffff93b30f201fe1;hb=680c79a86e3ed402f263faeac92e89fb6d9edcc0;hp=d341422351c826e6e5ebbea23f6b4139a7af6f2b;hpb=a2bd1bf0c2c1f1a17d188f4dc0726a45494cefae;p=yaffs-website diff --git a/web/core/misc/details-aria.js b/web/core/misc/details-aria.js index d34142235..f927ab3cb 100644 --- a/web/core/misc/details-aria.js +++ b/web/core/misc/details-aria.js @@ -1,19 +1,13 @@ /** - * @file - * Add aria attribute handling for details and summary elements. - */ +* DO NOT EDIT THIS FILE. +* See the following change record for more information, +* https://www.drupal.org/node/2815083 +* @preserve +**/ (function ($, Drupal) { - - 'use strict'; - - /** - * Handles `aria-expanded` and `aria-pressed` attributes on details elements. - * - * @type {Drupal~behavior} - */ Drupal.behaviors.detailsAria = { - attach: function () { + attach: function attach() { $('body').once('detailsAria').on('click.detailsAria', 'summary', function (event) { var $summary = $(event.currentTarget); var open = $(event.currentTarget.parentNode).attr('open') === 'open' ? 'false' : 'true'; @@ -25,5 +19,4 @@ }); } }; - -})(jQuery, Drupal); +})(jQuery, Drupal); \ No newline at end of file