Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Remove accessibility CSS; Auto focus #583

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 27 commits into from
Mar 1, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
e561d61
Change accessibility example links
MathuraMG Jan 13, 2017
1661fa0
Merge pull request #1 from MathuraMG/update-readme
MathuraMG Jan 13, 2017
f67128c
Merge branch 'master' of https://github.com/MathuraMG/p5.js-web-editor
MathuraMG Feb 9, 2017
c0f6d05
Merge branch 'master' of https://github.com/processing/p5.js-web-editor
MathuraMG Feb 15, 2017
175da68
Merge branch 'master' of https://github.com/processing/p5.js-web-editor
MathuraMG Feb 16, 2017
b25d83b
Merge branch 'master' of https://github.com/processing/p5.js-web-editor
MathuraMG Feb 22, 2017
e440b69
Merge branch 'master' of https://github.com/processing/p5.js-web-editor
MathuraMG Mar 1, 2017
b5ee17b
Merge branch 'master' of https://github.com/processing/p5.js-web-editor
MathuraMG Mar 4, 2017
8ecaad1
Merge branch 'master' of https://github.com/processing/p5.js-web-editor
MathuraMG Mar 6, 2017
4ed2e5a
Merge branch 'master' of https://github.com/processing/p5.js-web-editor
MathuraMG Oct 4, 2017
344e50e
added library to iframe
Dec 22, 2017
cff4819
changed preview to add accessible elements to iframe
Dec 22, 2017
dcda574
add library only when accesible output is seleceted
Dec 25, 2017
794d47c
Merge branch 'master' of https://github.com/processing/p5.js-web-editor
MathuraMG Jan 6, 2018
480df7a
Merge branch 'master' of https://github.com/processing/p5.js-web-editor
MathuraMG Jan 14, 2018
cf76989
focus on iframe when plaing
Jan 16, 2018
1ae2c6f
css
Jan 16, 2018
7097808
deleted accessibleOutput.jsx and edited IDEView to integrate accessib…
Jan 17, 2018
d98e700
deleted comments
Jan 17, 2018
e510b8f
Merge pull request #506 from lm-n/accessibilitylib
MathuraMG Jan 25, 2018
de09aaa
Merge branch 'accessibility' of https://github.com/processing/p5.js-w…
MathuraMG Jan 30, 2018
19e183f
merge master
MathuraMG Feb 12, 2018
2fd7930
Merge branch 'master' of https://github.com/processing/p5.js-web-editor
MathuraMG Feb 15, 2018
d02aebf
merge master;
MathuraMG Feb 27, 2018
b829d3a
fix package
MathuraMG Feb 27, 2018
bd97c46
Moved CSS to library and removed section from file.js (#2)
Mar 1, 2018
ac10a8d
add autofocus; remove CSS
MathuraMG Mar 1, 2018
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
9 changes: 2 additions & 7 deletions client/modules/IDE/components/PreviewFrame.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -205,16 +205,11 @@ 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'
'src', 'https://cdn.rawgit.com/MathuraMG/p5-accessibility/298ccdf6/dist/p5-accessibility.js'
);
const accessibleOutputs = sketchDoc.createElement('section');
accessibleOutputs.setAttribute('id', 'accessible-outputs');
accessibleOutputs.style.position = 'absolute';
accessibleOutputs.style.left = '-1000px';
accessibleOutputs.style.top = 'auto';
accessibleOutputs.style.width = '1px';
accessibleOutputs.style.height = '1px';
accessibleOutputs.style.overflow = 'hidden';
accessibleOutputs.setAttribute('aria-label', 'accessible-output');
if (this.props.textOutput) {
sketchDoc.body.appendChild(accessibleOutputs);
sketchDoc.body.appendChild(accessiblelib);
Expand Down
8 changes: 7 additions & 1 deletion client/modules/IDE/components/Toolbar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,11 @@ class Toolbar extends React.Component {
<div className="toolbar">
<button
className="toolbar__play-sketch-button"
onClick={this.props.startAccessibleSketch}
onClick={() => {
this.props.startAccessibleSketch();
this.props.setTextOutput(true);
this.props.setGridOutput(true);
}}
aria-label="play sketch"
disabled={this.props.infiniteLoop}
>
Expand Down Expand Up @@ -169,6 +173,8 @@ Toolbar.propTypes = {
infiniteLoop: PropTypes.bool.isRequired,
autorefresh: PropTypes.bool.isRequired,
setAutorefresh: PropTypes.func.isRequired,
setTextOutput: PropTypes.func.isRequired,
setGridOutput: PropTypes.func.isRequired,
startSketch: PropTypes.func.isRequired,
startAccessibleSketch: PropTypes.func.isRequired,
saveProject: PropTypes.func.isRequired,
Expand Down
8 changes: 4 additions & 4 deletions client/modules/IDE/reducers/files.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import objectID from 'bson-objectid';
import * as ActionTypes from '../../../constants';

const defaultSketch = `function setup() {
const defaultSketch = `function setup() {
createCanvas(400, 400);
}
}

function draw() {
function draw() {
background(220);
}`;

Expand All @@ -22,7 +22,7 @@ const defaultHTML =
</head>
<body>
<script src="sketch.js"></script>
</body>
</body>
</html>
`;

Expand Down