diff --git a/client/modules/IDE/components/PreviewFrame.jsx b/client/modules/IDE/components/PreviewFrame.jsx index 8f714657ef..6e4f20fc97 100644 --- a/client/modules/IDE/components/PreviewFrame.jsx +++ b/client/modules/IDE/components/PreviewFrame.jsx @@ -204,22 +204,27 @@ class PreviewFrame extends React.Component { ]; const accessiblelib = sketchDoc.createElement('script'); accessiblelib.setAttribute('src', 'https://cdn.rawgit.com/MathuraMG/p5-accessibility/9cb5bd0b/dist/p5-accessibility.js'); + const accessibleOutputs = sketchDoc.createElement('section'); + accessibleOutputs.setAttribute('id', 'accessible-outputs'); if (this.props.textOutput) { - sketchDoc.getElementById('accessibility-library').appendChild(accessiblelib); + sketchDoc.body.appendChild(accessibleOutputs); + sketchDoc.body.appendChild(accessiblelib); const textSection = sketchDoc.createElement('section'); textSection.setAttribute('id', 'textOutput-content'); sketchDoc.getElementById('accessible-outputs').appendChild(textSection); this.iframeElement.focus(); } if (this.props.gridOutput) { - sketchDoc.getElementById('accessibility-library').appendChild(accessiblelib); + sketchDoc.body.appendChild(accessibleOutputs); + sketchDoc.body.appendChild(accessiblelib); const gridSection = sketchDoc.createElement('section'); gridSection.setAttribute('id', 'gridOutput-content'); sketchDoc.getElementById('accessible-outputs').appendChild(gridSection); this.iframeElement.focus(); } if (this.props.soundOutput) { - sketchDoc.getElementById('accessibility-library').appendChild(accessiblelib); + sketchDoc.body.appendChild(accessibleOutputs); + sketchDoc.body.appendChild(accessiblelib); const soundSection = sketchDoc.createElement('section'); soundSection.setAttribute('id', 'soundOutput-content'); sketchDoc.getElementById('accessible-outputs').appendChild(soundSection); diff --git a/client/modules/IDE/reducers/files.js b/client/modules/IDE/reducers/files.js index 2fdc8104c6..98075ed6e8 100644 --- a/client/modules/IDE/reducers/files.js +++ b/client/modules/IDE/reducers/files.js @@ -21,9 +21,7 @@ const defaultHTML = -
-
`;