File tree Expand file tree Collapse file tree 3 files changed +13
-12
lines changed Expand file tree Collapse file tree 3 files changed +13
-12
lines changed Original file line number Diff line number Diff line change @@ -205,16 +205,11 @@ class PreviewFrame extends React.Component {
205205 ] ;
206206 const accessiblelib = sketchDoc . createElement ( 'script' ) ;
207207 accessiblelib . setAttribute (
208- 'src' , 'https://cdn.rawgit.com/MathuraMG/p5-accessibility/9cb5bd0b /dist/p5-accessibility.js'
208+ 'src' , 'https://cdn.rawgit.com/MathuraMG/p5-accessibility/298ccdf6 /dist/p5-accessibility.js'
209209 ) ;
210210 const accessibleOutputs = sketchDoc . createElement ( 'section' ) ;
211211 accessibleOutputs . setAttribute ( 'id' , 'accessible-outputs' ) ;
212- accessibleOutputs . style . position = 'absolute' ;
213- accessibleOutputs . style . left = '-1000px' ;
214- accessibleOutputs . style . top = 'auto' ;
215- accessibleOutputs . style . width = '1px' ;
216- accessibleOutputs . style . height = '1px' ;
217- accessibleOutputs . style . overflow = 'hidden' ;
212+ accessibleOutputs . setAttribute ( 'aria-label' , 'accessible-output' ) ;
218213 if ( this . props . textOutput ) {
219214 sketchDoc . body . appendChild ( accessibleOutputs ) ;
220215 sketchDoc . body . appendChild ( accessiblelib ) ;
Original file line number Diff line number Diff line change @@ -60,7 +60,11 @@ class Toolbar extends React.Component {
6060 < div className = "toolbar" >
6161 < button
6262 className = "toolbar__play-sketch-button"
63- onClick = { this . props . startAccessibleSketch }
63+ onClick = { ( ) => {
64+ this . props . startAccessibleSketch ( ) ;
65+ this . props . setTextOutput ( true ) ;
66+ this . props . setGridOutput ( true ) ;
67+ } }
6468 aria-label = "play sketch"
6569 disabled = { this . props . infiniteLoop }
6670 >
@@ -169,6 +173,8 @@ Toolbar.propTypes = {
169173 infiniteLoop : PropTypes . bool . isRequired ,
170174 autorefresh : PropTypes . bool . isRequired ,
171175 setAutorefresh : PropTypes . func . isRequired ,
176+ setTextOutput : PropTypes . func . isRequired ,
177+ setGridOutput : PropTypes . func . isRequired ,
172178 startSketch : PropTypes . func . isRequired ,
173179 startAccessibleSketch : PropTypes . func . isRequired ,
174180 saveProject : PropTypes . func . isRequired ,
Original file line number Diff line number Diff line change 11import objectID from 'bson-objectid' ;
22import * as ActionTypes from '../../../constants' ;
33
4- const defaultSketch = `function setup() {
4+ const defaultSketch = `function setup() {
55 createCanvas(400, 400);
6- }
6+ }
77
8- function draw() {
8+ function draw() {
99 background(220);
1010}` ;
1111
@@ -22,7 +22,7 @@ const defaultHTML =
2222 </head>
2323 <body>
2424 <script src="sketch.js"></script>
25- </body>
25+ </body>
2626</html>
2727` ;
2828
You can’t perform that action at this time.
0 commit comments