Unverified Commit 03b0c2ba authored by Lauri Timmanee's avatar Lauri Timmanee
Browse files

Issue #3210329 by mherchel, Gauravmahlawat: Olivero: Invalid aria attribute on...

Issue #3210329 by mherchel, Gauravmahlawat: Olivero: Invalid aria attribute on sticky-header-toggle on fresh page load
parent 67e76624
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -22,6 +22,7 @@ module.exports = {
        'Congratulations and welcome to the Drupal community!',
      )
      .assert.not.visible(buttonSelector)
      .assert.attributeEquals(buttonSelector, 'aria-checked', 'false')
      .getLocationInView('footer.site-footer', () => {
        browser.assert.visible(buttonSelector);
        browser.assert.not.visible('#site-header__inner');
+2 −2
Original line number Diff line number Diff line
@@ -73,7 +73,7 @@
      'Drupal.olivero.stickyHeaderState',
    );

    if (!stickyHeaderState) return null;
    if (!stickyHeaderState) return false;

    const item = JSON.parse(stickyHeaderState);
    const now = new Date();
@@ -82,7 +82,7 @@
    if (now.getTime() > item.expiry) {
      // If the item is expired, delete the item from storage and return null.
      localStorage.removeItem('Drupal.olivero.stickyHeaderState');
      return null;
      return false;
    }
    return item.value;
  }
+2 −2
Original line number Diff line number Diff line
@@ -45,13 +45,13 @@

  function getStickyHeaderStorage() {
    var stickyHeaderState = localStorage.getItem('Drupal.olivero.stickyHeaderState');
    if (!stickyHeaderState) return null;
    if (!stickyHeaderState) return false;
    var item = JSON.parse(stickyHeaderState);
    var now = new Date();

    if (now.getTime() > item.expiry) {
      localStorage.removeItem('Drupal.olivero.stickyHeaderState');
      return null;
      return false;
    }

    return item.value;