Skip to content

Commit 4e8f9e4

Browse files
Luis Morales-NavarroMathuraMG
authored andcommitted
Fixes #508 (#545)
* removed submodule and replaced interceptor for library * deleted comments * deleted jquery * deleted interceptor folder * delete interceptor * added jquery * removed jquery and updated accessible library cdn * remove empty divs from files.js * fix merge error * remove empty divs from files.js
1 parent bb846c2 commit 4e8f9e4

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

client/modules/IDE/components/PreviewFrame.jsx

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -204,22 +204,27 @@ class PreviewFrame extends React.Component {
204204
];
205205
const accessiblelib = sketchDoc.createElement('script');
206206
accessiblelib.setAttribute('src', 'https://cdn.rawgit.com/MathuraMG/p5-accessibility/9cb5bd0b/dist/p5-accessibility.js');
207+
const accessibleOutputs = sketchDoc.createElement('section');
208+
accessibleOutputs.setAttribute('id', 'accessible-outputs');
207209
if (this.props.textOutput) {
208-
sketchDoc.getElementById('accessibility-library').appendChild(accessiblelib);
210+
sketchDoc.body.appendChild(accessibleOutputs);
211+
sketchDoc.body.appendChild(accessiblelib);
209212
const textSection = sketchDoc.createElement('section');
210213
textSection.setAttribute('id', 'textOutput-content');
211214
sketchDoc.getElementById('accessible-outputs').appendChild(textSection);
212215
this.iframeElement.focus();
213216
}
214217
if (this.props.gridOutput) {
215-
sketchDoc.getElementById('accessibility-library').appendChild(accessiblelib);
218+
sketchDoc.body.appendChild(accessibleOutputs);
219+
sketchDoc.body.appendChild(accessiblelib);
216220
const gridSection = sketchDoc.createElement('section');
217221
gridSection.setAttribute('id', 'gridOutput-content');
218222
sketchDoc.getElementById('accessible-outputs').appendChild(gridSection);
219223
this.iframeElement.focus();
220224
}
221225
if (this.props.soundOutput) {
222-
sketchDoc.getElementById('accessibility-library').appendChild(accessiblelib);
226+
sketchDoc.body.appendChild(accessibleOutputs);
227+
sketchDoc.body.appendChild(accessiblelib);
223228
const soundSection = sketchDoc.createElement('section');
224229
soundSection.setAttribute('id', 'soundOutput-content');
225230
sketchDoc.getElementById('accessible-outputs').appendChild(soundSection);

client/modules/IDE/reducers/files.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,7 @@ const defaultHTML =
2121
2222
</head>
2323
<body>
24-
<section aria-label='accessible output' id='accessible-outputs'></section>
2524
<script src="sketch.js"></script>
26-
<div id='accessibility-library'></div>
2725
</body>
2826
</html>
2927
`;

0 commit comments

Comments
 (0)