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 {
205
205
] ;
206
206
const accessiblelib = sketchDoc . createElement ( 'script' ) ;
207
207
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'
209
209
) ;
210
210
const accessibleOutputs = sketchDoc . createElement ( 'section' ) ;
211
211
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' ) ;
218
213
if ( this . props . textOutput ) {
219
214
sketchDoc . body . appendChild ( accessibleOutputs ) ;
220
215
sketchDoc . body . appendChild ( accessiblelib ) ;
Original file line number Diff line number Diff line change @@ -60,7 +60,11 @@ class Toolbar extends React.Component {
60
60
< div className = "toolbar" >
61
61
< button
62
62
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
+ } }
64
68
aria-label = "play sketch"
65
69
disabled = { this . props . infiniteLoop }
66
70
>
@@ -169,6 +173,8 @@ Toolbar.propTypes = {
169
173
infiniteLoop : PropTypes . bool . isRequired ,
170
174
autorefresh : PropTypes . bool . isRequired ,
171
175
setAutorefresh : PropTypes . func . isRequired ,
176
+ setTextOutput : PropTypes . func . isRequired ,
177
+ setGridOutput : PropTypes . func . isRequired ,
172
178
startSketch : PropTypes . func . isRequired ,
173
179
startAccessibleSketch : PropTypes . func . isRequired ,
174
180
saveProject : PropTypes . func . isRequired ,
Original file line number Diff line number Diff line change 1
1
import objectID from 'bson-objectid' ;
2
2
import * as ActionTypes from '../../../constants' ;
3
3
4
- const defaultSketch = `function setup() {
4
+ const defaultSketch = `function setup() {
5
5
createCanvas(400, 400);
6
- }
6
+ }
7
7
8
- function draw() {
8
+ function draw() {
9
9
background(220);
10
10
}` ;
11
11
@@ -22,7 +22,7 @@ const defaultHTML =
22
22
</head>
23
23
<body>
24
24
<script src="sketch.js"></script>
25
- </body>
25
+ </body>
26
26
</html>
27
27
` ;
28
28
You can’t perform that action at this time.
0 commit comments