Skip to content

Commit

Permalink
Always show summary if available.
Browse files Browse the repository at this point in the history
  • Loading branch information
ZebulanStanphill committed Sep 9, 2020
1 parent 2a4456f commit b441fb0
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions packages/components/src/panel/body.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,6 @@ const PanelBodyHeader = forwardRef(

if ( ! title ) return null;

const showSummary = ! isOpened && summary;

return (
<header className="components-panel__body-header">
<h2 className="components-panel__body-title">
Expand All @@ -101,7 +99,7 @@ const PanelBodyHeader = forwardRef(
aria-expanded={ isOpened }
ref={ ref }
{ ...props }
aria-describedby={ showSummary ? summaryId : undefined }
aria-describedby={ summary ? summaryId : undefined }
>
{ /*
Firefox + NVDA don't announce aria-expanded because the browser
Expand All @@ -123,7 +121,7 @@ const PanelBodyHeader = forwardRef(
) }
</Button>
</h2>
{ showSummary && (
{ summary && (
<div className={ summaryClassName } id={ summaryId }>
{ summary }
</div>
Expand Down

0 comments on commit b441fb0

Please sign in to comment.