1/** 2 * @file 3 * Add aria attribute handling for details and summary elements. 4 */ 5 6(function ($, Drupal) { 7 /** 8 * Handles `aria-expanded` and `aria-pressed` attributes on details elements. 9 * 10 * @type {Drupal~behavior} 11 */ 12 Drupal.behaviors.detailsAria = { 13 attach() { 14 $(once('detailsAria', 'body')).on( 15 'click.detailsAria', 16 'summary', 17 (event) => { 18 const $summary = $(event.currentTarget); 19 const open = 20 $(event.currentTarget.parentNode).attr('open') === 'open' 21 ? 'false' 22 : 'true'; 23 24 $summary.attr({ 25 'aria-expanded': open, 26 }); 27 }, 28 ); 29 }, 30 }; 31})(jQuery, Drupal);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.