-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
99 lines (73 loc) · 4.23 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
<!DOCTYPE html>
<html>
<head>
<title>R Interface</title>
<!-- Include the external CSS file -->
<link rel="stylesheet" href="styles.css">
<!-- Include the external script files -->
<script src="ButtonActions.js"> </script>
<script src="FolderActions.js"> </script>
<script src="FetchHTMLContent.js"> </script>
</head>
<body>
<h1> A standalone interface for blind users wanting an accessible interactive R experience</h1>
This interface is designed to replace an interactive R session, normally run using an R Terminal or the R GUI. In either case, long amounts of output are not accessible to a blind user.
<button onclick="toggleText('Credits')">
Show/hide the credits
</button>
<div id="Credits" class="hidden">
This interface was started by Jonathan Godfrey in July 2023. The back end needs to be sorted out, but javascript tools seem to have some chance of working.
</div>
<button onclick="toggleText('instructions')">
Click here to show/hide Instructions
</button>
<div id="instructions" class="hidden">
Instructions are separated for the sections of this interface. Take a quick look at the rest of the page to familiarise yourself with the overall layout before reading the instructions for using each section.
<button onclick="toggleText('InstructionsGettingStarted')">
Show/hide instructions for getting started
</button>
<div id="InstructionsGettingStarted" class="hidden">
The Getting Ready section makes sure the interface is ready to go, and is operating in the correct working directory. Check the current working directory and the R version; if both are correct, hit the "get working" button. <p>
If the R version is not showing, you have major problems relating to the installation of R, or this interface cannot link up with the installation. <p>
If the current directory is not where you want to be working, you will need to hit the "change directory" button.
</div>
<button onclick="toggleText('InstructionsOutput')">
Show/hide instructions for the output section
</button>
<div id="InstructionsOutput" class="hidden">
The output section is actually both input and output. Once commands are executed, they will be printed at the bottom of the existing output. They will appear using heading level 4 HTML tags or graphics but will be clearly identifiable. <p>
In order to read the most recent output using a screen reader, you will need to move forward and back using the hot keys for any standard web page. Remember you can move forwards to the next graphic using "g" and back to the previous one using "shift+g".
</div>
<button onclick="toggleText('InstructionsNextSteps')">
Show/hide instructions for the next steps section.
</button>
<div id="InstructionsNextSteps" class="hidden">
When you are ready to type commands, go to the only edit box on this creen. You can type commands or copy and paste them into the box. To execute the commands just click on the next button called "Execute". N.B. Execution of code is only possible if you have specified the working directory in the Getting Started section.<br>
If you have finished entering commands, look to save your work using one or more of the other three buttons at the bottom of this page. These buttons will:
<ol>
<li>save all the work done including input and output,</li>
<li>save your commands as an R script, or</li>
<li>save your commands in the form of an R markdown file.</li>
</ol>
When you click a button to save your work, you will be prompted to choose a filename etc.
</div>
</div>
<div id="GettingReadyArea">
<h2> Getting ready</h2>
<p id="currentDirectory"></p>
<button> Get working </button>
<button> Change directory </button>
</div>
<div id="outputArea">
<h2> Output to date</h2>
</div>
<div>
<h2>Next steps</h2>
<input type="text" id="commandInput" placeholder="Enter an R command" />
<button onclick="executeCommand()">Execute</button>
<button onclick="copyAllOutputToFile()">Copy all output to a text file</button>
<button onclick="MakeRScriptFile()">Copy R input to a R script file</button>
<button onclick="MakeRmdFile()">Convert all input to an R markdown file</button>
</div>
</body>
</html>