Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions client/modules/IDE/components/PreviewFrame.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 0 additions & 2 deletions client/modules/IDE/reducers/files.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@ const defaultHTML =

</head>
<body>
<section aria-label='accessible output' id='accessible-outputs'></section>
<script src="sketch.js"></script>
<div id='accessibility-library'></div>
</body>
</html>
`;
Expand Down