Verified Commit 91a743c1 authored by Dave Long's avatar Dave Long
Browse files

Issue #3403198 by simohell, mgifford, itmaybejj: Details do not benefit from aria-pressed

parent da7f4e63
Loading
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -255,7 +255,6 @@ function template_preprocess_details(&$variables) {
      $variables['summary_attributes']['aria-controls'] = $element['#attributes']['id'];
    }
    $variables['summary_attributes']['aria-expanded'] = !empty($element['#attributes']['open']) ? 'true' : 'false';
    $variables['summary_attributes']['aria-pressed'] = $variables['summary_attributes']['aria-expanded'];
  }
  $variables['title'] = (!empty($element['#title'])) ? $element['#title'] : '';
  // If the element title is a string, wrap it a render array so that markup
+0 −1
Original line number Diff line number Diff line
@@ -23,7 +23,6 @@

          $summary.attr({
            'aria-expanded': open,
            'aria-pressed': open,
          });
        },
      );
+0 −1
Original line number Diff line number Diff line
@@ -134,7 +134,6 @@ public function testDetailsChildVisibility() {

    // Assert that both aria-expanded and aria-pressed are true.
    $this->assertEquals('true', $summary->getAttribute('aria-expanded'));
    $this->assertEquals('true', $summary->getAttribute('aria-pressed'));
  }

  /**