File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -67,6 +67,7 @@ class Dialog extends Component {
6767
6868 const labelledByID = `googlesitekit-dialog-label-${ instanceId } ` ;
6969 const describedByID = `googlesitekit-dialog-description-${ instanceId } ` ;
70+ const hasProvides = ! ! ( provides && provides . length ) ;
7071
7172 return (
7273 < div
@@ -75,7 +76,7 @@ class Dialog extends Component {
7576 role = "alertdialog"
7677 aria-modal = "true"
7778 aria-labelledby = { title ? labelledByID : undefined }
78- aria-describedby = { ( provides && provides . length ) ? describedByID : undefined }
79+ aria-describedby = { hasProvides ? describedByID : undefined }
7980 aria-hidden = { dialogActive ? 'false' : 'true' }
8081 tabIndex = "-1"
8182 >
@@ -94,7 +95,7 @@ class Dialog extends Component {
9495 { subtitle }
9596 </ p >
9697 }
97- { ( provides && provides . length ) &&
98+ { hasProvides &&
9899 < section id = { describedByID } className = "mdc-dialog__content" >
99100 < ul className = "mdc-list mdc-list--underlined mdc-list--non-interactive" >
100101 { provides . map ( ( attribute ) => (
You can’t perform that action at this time.
0 commit comments