Chris@0: /** Chris@0: * DO NOT EDIT THIS FILE. Chris@0: * See the following change record for more information, Chris@0: * https://www.drupal.org/node/2815083 Chris@0: * @preserve Chris@0: **/ Chris@0: Chris@0: (function ($, Drupal) { Chris@0: Drupal.behaviors.detailsAria = { Chris@0: attach: function attach() { Chris@0: $('body').once('detailsAria').on('click.detailsAria', 'summary', function (event) { Chris@0: var $summary = $(event.currentTarget); Chris@0: var open = $(event.currentTarget.parentNode).attr('open') === 'open' ? 'false' : 'true'; Chris@0: Chris@0: $summary.attr({ Chris@0: 'aria-expanded': open, Chris@0: 'aria-pressed': open Chris@0: }); Chris@0: }); Chris@0: } Chris@0: }; Chris@0: })(jQuery, Drupal);