upgrades core to 8.4.2

This commit is contained in:
Bachir Soussi Chiadmi
2017-11-14 16:09:54 +01:00
parent bd60eff9b3
commit c2b4e25be4
3504 changed files with 140306 additions and 38684 deletions
+25
View File
@@ -0,0 +1,25 @@
/**
* @file
* Add aria attribute handling for details and summary elements.
*/
(function ($, Drupal) {
/**
* Handles `aria-expanded` and `aria-pressed` attributes on details elements.
*
* @type {Drupal~behavior}
*/
Drupal.behaviors.detailsAria = {
attach() {
$('body').once('detailsAria').on('click.detailsAria', 'summary', (event) => {
const $summary = $(event.currentTarget);
const open = $(event.currentTarget.parentNode).attr('open') === 'open' ? 'false' : 'true';
$summary.attr({
'aria-expanded': open,
'aria-pressed': open,
});
});
},
};
}(jQuery, Drupal));