updated core to 8.6.1 via composer

This commit is contained in:
2018-09-12 13:58:26 +02:00
parent a9a219f2ed
commit ea56b9fba3
4443 changed files with 112098 additions and 40708 deletions
+14 -9
View File
@@ -3,7 +3,7 @@
* Add aria attribute handling for details and summary elements.
*/
(function ($, Drupal) {
(function($, Drupal) {
/**
* Handles `aria-expanded` and `aria-pressed` attributes on details elements.
*
@@ -11,15 +11,20 @@
*/
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';
$('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,
$summary.attr({
'aria-expanded': open,
'aria-pressed': open,
});
});
});
},
};
}(jQuery, Drupal));
})(jQuery, Drupal);