Skip to content

Commit 52db695

Browse files
Merge pull request #313 from coding-for-reproducible-research/accessibility
Accessibility fix for header of JB
2 parents 75444e2 + 8947ad5 commit 52db695

11 files changed

+59
-13
lines changed

_config.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ html:
2929
use_navigation_shortcuts: false
3030
extra_css:
3131
- _static/remove_prev_next_bottom_buttons.css
32+
extra_js:
33+
- overlay-label-accessibility.js
34+
3235

3336
launch_buttons:
3437
thebe : false

_static/multiple_regression_hyperplane.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

_static/multiple_regression_hyperplane_2.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
document.addEventListener('DOMContentLoaded', function() {
2+
// Fix overlay <label> elements by replacing them with <div>
3+
document.querySelectorAll('label.overlay').forEach(function(label) {
4+
var div = document.createElement('div');
5+
div.className = label.className;
6+
for (var i = 0; i < label.attributes.length; i++) {
7+
var attr = label.attributes[i];
8+
if (attr.name !== 'for') div.setAttribute(attr.name, attr.value);
9+
}
10+
div.setAttribute('aria-hidden', 'true');
11+
div.innerHTML = label.innerHTML;
12+
label.parentNode.replaceChild(div, label);
13+
});
14+
15+
// For each sidebar checkbox, add an aria-label if missing
16+
[
17+
{ selector: 'input.sidebar-toggle#\\__primary', label: 'Toggle primary sidebar' },
18+
{ selector: 'input.sidebar-toggle#\\__secondary', label: 'Toggle secondary sidebar' }
19+
].forEach(function(cfg) {
20+
document.querySelectorAll(cfg.selector).forEach(function(input) {
21+
if (!input.hasAttribute('aria-label')) {
22+
input.setAttribute('aria-label', cfg.label);
23+
}
24+
});
25+
});
26+
27+
// Inject CSS for .sr-only (optional, in case you use it elsewhere)
28+
var style = document.createElement('style');
29+
style.innerHTML = `
30+
.sr-only {
31+
position: absolute !important;
32+
width: 1px !important;
33+
height: 1px !important;
34+
padding: 0 !important;
35+
margin: -1px !important;
36+
overflow: hidden !important;
37+
clip: rect(0,0,0,0) !important;
38+
border: 0 !important;
39+
white-space: nowrap !important;
40+
}
41+
`;
42+
document.head.appendChild(style);
43+
});

_static/workshop_prereqs_advanced_regression_analysis_with_r_.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -282,8 +282,8 @@ <h1></h1>
282282

283283

284284
// parsing and collecting nodes and edges from the python
285-
nodes = new vis.DataSet([{"color": "#B0B0B0", "id": "Regression Analysis with R Adapting to Varied Data Types", "label": "Regression Analysis with R Adapting to Varied Data Types", "level": 3, "shape": "dot", "size": 10, "title": "Course Name: Regression Analysis with R Adapting to Varied Data Types\nCourse Pre-reqs: Introduction to Regression with R\nSubsequent Courses: Advanced Regression Analysis With R "}, {"color": "#B0B0B0", "id": "Advanced Regression Analysis With R ", "label": "Advanced Regression Analysis With R ", "level": 4, "shape": "dot", "size": 10, "title": "Course Name: Advanced Regression Analysis With R \nCourse Pre-reqs: Regression Analysis with R Adapting to Varied Data Types\nSubsequent Courses: None"}, {"color": "#B0B0B0", "id": "Introduction to Regression with R", "label": "Introduction to Regression with R", "level": 2, "shape": "dot", "size": 10, "title": "Course Name: Introduction to Regression with R\nCourse Pre-reqs: Introduction to R\nSubsequent Courses: Regression Analysis with R Adapting to Varied Data Types"}, {"color": "#B0B0B0", "id": "Introduction to R", "label": "Introduction to R", "level": 1, "shape": "dot", "size": 10, "title": "Course Name: Introduction to R\nCourse Pre-reqs: None\nSubsequent Courses: Introduction to Regression with R"}]);
286-
edges = new vis.DataSet([{"arrows": "to", "from": "Regression Analysis with R Adapting to Varied Data Types", "to": "Advanced Regression Analysis With R ", "width": 1}, {"arrows": "to", "from": "Introduction to Regression with R", "to": "Regression Analysis with R Adapting to Varied Data Types", "width": 1}, {"arrows": "to", "from": "Introduction to R", "to": "Introduction to Regression with R", "width": 1}]);
285+
nodes = new vis.DataSet([{"color": "#B0B0B0", "id": "Introduction to R", "label": "Introduction to R", "level": 1, "shape": "dot", "size": 10, "title": "Course Name: Introduction to R\nCourse Pre-reqs: None\nSubsequent Courses: Introduction to Regression with R"}, {"color": "#B0B0B0", "id": "Introduction to Regression with R", "label": "Introduction to Regression with R", "level": 2, "shape": "dot", "size": 10, "title": "Course Name: Introduction to Regression with R\nCourse Pre-reqs: Introduction to R\nSubsequent Courses: Regression Analysis with R Adapting to Varied Data Types"}, {"color": "#B0B0B0", "id": "Regression Analysis with R Adapting to Varied Data Types", "label": "Regression Analysis with R Adapting to Varied Data Types", "level": 3, "shape": "dot", "size": 10, "title": "Course Name: Regression Analysis with R Adapting to Varied Data Types\nCourse Pre-reqs: Introduction to Regression with R\nSubsequent Courses: Advanced Regression Analysis With R "}, {"color": "#B0B0B0", "id": "Advanced Regression Analysis With R ", "label": "Advanced Regression Analysis With R ", "level": 4, "shape": "dot", "size": 10, "title": "Course Name: Advanced Regression Analysis With R \nCourse Pre-reqs: Regression Analysis with R Adapting to Varied Data Types\nSubsequent Courses: None"}]);
286+
edges = new vis.DataSet([{"arrows": "to", "from": "Introduction to R", "to": "Introduction to Regression with R", "width": 1}, {"arrows": "to", "from": "Regression Analysis with R Adapting to Varied Data Types", "to": "Advanced Regression Analysis With R ", "width": 1}, {"arrows": "to", "from": "Introduction to Regression with R", "to": "Regression Analysis with R Adapting to Varied Data Types", "width": 1}]);
287287

288288
nodeColors = {};
289289
allNodes = nodes.get({ returnType: "Object" });

_static/workshop_prereqs_intermediate_version_control.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -282,8 +282,8 @@ <h1></h1>
282282

283283

284284
// parsing and collecting nodes and edges from the python
285-
nodes = new vis.DataSet([{"color": "#B0B0B0", "id": "Introduction to Version Control with Git and GitHub", "label": "Introduction to Version Control with Git and GitHub", "level": 2, "shape": "dot", "size": 10, "title": "Course Name: Introduction to Version Control with Git and GitHub\nCourse Pre-reqs: Introduction to Unix\nSubsequent Courses: Intermediate Version Control"}, {"color": "#B0B0B0", "id": "Intermediate Version Control", "label": "Intermediate Version Control", "level": 3, "shape": "dot", "size": 10, "title": "Course Name: Intermediate Version Control\nCourse Pre-reqs: Introduction to Version Control with Git and GitHub\nSubsequent Courses: None"}, {"color": "#B0B0B0", "id": "Introduction to Unix", "label": "Introduction to Unix", "level": 1, "shape": "dot", "size": 10, "title": "Course Name: Introduction to Unix\nCourse Pre-reqs: None\nSubsequent Courses: Introduction to Version Control with Git and GitHub"}]);
286-
edges = new vis.DataSet([{"arrows": "to", "from": "Introduction to Version Control with Git and GitHub", "to": "Intermediate Version Control", "width": 1}, {"arrows": "to", "from": "Introduction to Unix", "to": "Introduction to Version Control with Git and GitHub", "width": 1}]);
285+
nodes = new vis.DataSet([{"color": "#B0B0B0", "id": "Introduction to Unix", "label": "Introduction to Unix", "level": 1, "shape": "dot", "size": 10, "title": "Course Name: Introduction to Unix\nCourse Pre-reqs: None\nSubsequent Courses: Introduction to Version Control with Git and GitHub"}, {"color": "#B0B0B0", "id": "Introduction to Version Control with Git and GitHub", "label": "Introduction to Version Control with Git and GitHub", "level": 2, "shape": "dot", "size": 10, "title": "Course Name: Introduction to Version Control with Git and GitHub\nCourse Pre-reqs: Introduction to Unix\nSubsequent Courses: Intermediate Version Control"}, {"color": "#B0B0B0", "id": "Intermediate Version Control", "label": "Intermediate Version Control", "level": 3, "shape": "dot", "size": 10, "title": "Course Name: Intermediate Version Control\nCourse Pre-reqs: Introduction to Version Control with Git and GitHub\nSubsequent Courses: None"}]);
286+
edges = new vis.DataSet([{"arrows": "to", "from": "Introduction to Unix", "to": "Introduction to Version Control with Git and GitHub", "width": 1}, {"arrows": "to", "from": "Introduction to Version Control with Git and GitHub", "to": "Intermediate Version Control", "width": 1}]);
287287

288288
nodeColors = {};
289289
allNodes = nodes.get({ returnType: "Object" });

_static/workshop_prereqs_parallel_computing.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -282,8 +282,8 @@ <h1></h1>
282282

283283

284284
// parsing and collecting nodes and edges from the python
285-
nodes = new vis.DataSet([{"color": "#B0B0B0", "id": "Introduction to HPC", "label": "Introduction to HPC", "level": 2, "shape": "dot", "size": 10, "title": "Course Name: Introduction to HPC\nCourse Pre-reqs: Introduction to Unix\nSubsequent Courses: Parallel Computing"}, {"color": "#B0B0B0", "id": "Parallel Computing", "label": "Parallel Computing", "level": 3, "shape": "dot", "size": 10, "title": "Course Name: Parallel Computing\nCourse Pre-reqs: Introduction to HPC\nSubsequent Courses: None"}, {"color": "#B0B0B0", "id": "Introduction to Unix", "label": "Introduction to Unix", "level": 1, "shape": "dot", "size": 10, "title": "Course Name: Introduction to Unix\nCourse Pre-reqs: None\nSubsequent Courses: Introduction to HPC"}]);
286-
edges = new vis.DataSet([{"arrows": "to", "from": "Introduction to HPC", "to": "Parallel Computing", "width": 1}, {"arrows": "to", "from": "Introduction to Unix", "to": "Introduction to HPC", "width": 1}]);
285+
nodes = new vis.DataSet([{"color": "#B0B0B0", "id": "Introduction to Unix", "label": "Introduction to Unix", "level": 1, "shape": "dot", "size": 10, "title": "Course Name: Introduction to Unix\nCourse Pre-reqs: None\nSubsequent Courses: Introduction to HPC"}, {"color": "#B0B0B0", "id": "Introduction to HPC", "label": "Introduction to HPC", "level": 2, "shape": "dot", "size": 10, "title": "Course Name: Introduction to HPC\nCourse Pre-reqs: Introduction to Unix\nSubsequent Courses: Parallel Computing"}, {"color": "#B0B0B0", "id": "Parallel Computing", "label": "Parallel Computing", "level": 3, "shape": "dot", "size": 10, "title": "Course Name: Parallel Computing\nCourse Pre-reqs: Introduction to HPC\nSubsequent Courses: None"}]);
286+
edges = new vis.DataSet([{"arrows": "to", "from": "Introduction to Unix", "to": "Introduction to HPC", "width": 1}, {"arrows": "to", "from": "Introduction to HPC", "to": "Parallel Computing", "width": 1}]);
287287

288288
nodeColors = {};
289289
allNodes = nodes.get({ returnType: "Object" });

_static/workshop_prereqs_regression_analysis_with_r_adapting_to_varied_data_types.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -282,8 +282,8 @@ <h1></h1>
282282

283283

284284
// parsing and collecting nodes and edges from the python
285-
nodes = new vis.DataSet([{"color": "#B0B0B0", "id": "Introduction to Regression with R", "label": "Introduction to Regression with R", "level": 2, "shape": "dot", "size": 10, "title": "Course Name: Introduction to Regression with R\nCourse Pre-reqs: Introduction to R\nSubsequent Courses: Regression Analysis with R Adapting to Varied Data Types"}, {"color": "#B0B0B0", "id": "Regression Analysis with R Adapting to Varied Data Types", "label": "Regression Analysis with R Adapting to Varied Data Types", "level": 3, "shape": "dot", "size": 10, "title": "Course Name: Regression Analysis with R Adapting to Varied Data Types\nCourse Pre-reqs: Introduction to Regression with R\nSubsequent Courses: None"}, {"color": "#B0B0B0", "id": "Introduction to R", "label": "Introduction to R", "level": 1, "shape": "dot", "size": 10, "title": "Course Name: Introduction to R\nCourse Pre-reqs: None\nSubsequent Courses: Introduction to Regression with R"}]);
286-
edges = new vis.DataSet([{"arrows": "to", "from": "Introduction to Regression with R", "to": "Regression Analysis with R Adapting to Varied Data Types", "width": 1}, {"arrows": "to", "from": "Introduction to R", "to": "Introduction to Regression with R", "width": 1}]);
285+
nodes = new vis.DataSet([{"color": "#B0B0B0", "id": "Introduction to R", "label": "Introduction to R", "level": 1, "shape": "dot", "size": 10, "title": "Course Name: Introduction to R\nCourse Pre-reqs: None\nSubsequent Courses: Introduction to Regression with R"}, {"color": "#B0B0B0", "id": "Introduction to Regression with R", "label": "Introduction to Regression with R", "level": 2, "shape": "dot", "size": 10, "title": "Course Name: Introduction to Regression with R\nCourse Pre-reqs: Introduction to R\nSubsequent Courses: Regression Analysis with R Adapting to Varied Data Types"}, {"color": "#B0B0B0", "id": "Regression Analysis with R Adapting to Varied Data Types", "label": "Regression Analysis with R Adapting to Varied Data Types", "level": 3, "shape": "dot", "size": 10, "title": "Course Name: Regression Analysis with R Adapting to Varied Data Types\nCourse Pre-reqs: Introduction to Regression with R\nSubsequent Courses: None"}]);
286+
edges = new vis.DataSet([{"arrows": "to", "from": "Introduction to R", "to": "Introduction to Regression with R", "width": 1}, {"arrows": "to", "from": "Introduction to Regression with R", "to": "Regression Analysis with R Adapting to Varied Data Types", "width": 1}]);
287287

288288
nodeColors = {};
289289
allNodes = nodes.get({ returnType: "Object" });

_static/workshops_network_hpc.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ <h1></h1>
282282

283283

284284
// parsing and collecting nodes and edges from the python
285-
nodes = new vis.DataSet([{"color": "#4682B4", "id": "Introduction to HPC", "label": "Introduction to HPC", "level": 2, "shape": "dot", "size": 10, "title": "Course Name: Introduction to HPC\nCourse Pre-reqs: Introduction to Unix\nSubsequent Courses: Parallel Computing"}, {"color": "#4682B4", "id": "Parallel Computing", "label": "Parallel Computing", "level": 3, "shape": "dot", "size": 10, "title": "Course Name: Parallel Computing\nCourse Pre-reqs: Introduction to HPC\nSubsequent Courses: None"}, {"color": "#4682B4", "id": "Introduction to Unix", "label": "Introduction to Unix", "level": 1, "shape": "dot", "size": 10, "title": "Course Name: Introduction to Unix\nCourse Pre-reqs: None\nSubsequent Courses: Introduction to HPC, Introduction to Version Control with Git and GitHub"}, {"color": "#4682B4", "id": "Introduction to Version Control with Git and GitHub", "label": "Introduction to Version Control with Git and GitHub", "level": 2, "shape": "dot", "size": 10, "title": "Course Name: Introduction to Version Control with Git and GitHub\nCourse Pre-reqs: Introduction to Unix\nSubsequent Courses: Intermediate Version Control"}, {"color": "#4682B4", "id": "Intermediate Version Control", "label": "Intermediate Version Control", "level": 3, "shape": "dot", "size": 10, "title": "Course Name: Intermediate Version Control\nCourse Pre-reqs: Introduction to Version Control with Git and GitHub\nSubsequent Courses: None"}, {"color": "#4682B4", "id": "Introduction to Python", "label": "Introduction to Python", "level": 1, "shape": "dot", "size": 10, "title": "Course Name: Introduction to Python\nCourse Pre-reqs: None\nSubsequent Courses: None"}]);
285+
nodes = new vis.DataSet([{"color": "#FF6347", "id": "Introduction to HPC", "label": "Introduction to HPC", "level": 2, "shape": "dot", "size": 10, "title": "Course Name: Introduction to HPC\nCourse Pre-reqs: Introduction to Unix\nSubsequent Courses: Parallel Computing"}, {"color": "#FF6347", "id": "Parallel Computing", "label": "Parallel Computing", "level": 3, "shape": "dot", "size": 10, "title": "Course Name: Parallel Computing\nCourse Pre-reqs: Introduction to HPC\nSubsequent Courses: None"}, {"color": "#FF6347", "id": "Introduction to Unix", "label": "Introduction to Unix", "level": 1, "shape": "dot", "size": 10, "title": "Course Name: Introduction to Unix\nCourse Pre-reqs: None\nSubsequent Courses: Introduction to HPC, Introduction to Version Control with Git and GitHub"}, {"color": "#FF6347", "id": "Introduction to Version Control with Git and GitHub", "label": "Introduction to Version Control with Git and GitHub", "level": 2, "shape": "dot", "size": 10, "title": "Course Name: Introduction to Version Control with Git and GitHub\nCourse Pre-reqs: Introduction to Unix\nSubsequent Courses: Intermediate Version Control"}, {"color": "#FF6347", "id": "Intermediate Version Control", "label": "Intermediate Version Control", "level": 3, "shape": "dot", "size": 10, "title": "Course Name: Intermediate Version Control\nCourse Pre-reqs: Introduction to Version Control with Git and GitHub\nSubsequent Courses: None"}, {"color": "#FF6347", "id": "Introduction to Python", "label": "Introduction to Python", "level": 1, "shape": "dot", "size": 10, "title": "Course Name: Introduction to Python\nCourse Pre-reqs: None\nSubsequent Courses: None"}]);
286286
edges = new vis.DataSet([{"arrows": "to", "from": "Introduction to HPC", "to": "Parallel Computing", "width": 1}, {"arrows": "to", "from": "Introduction to Unix", "to": "Introduction to HPC", "width": 1}, {"arrows": "to", "from": "Introduction to Unix", "to": "Introduction to Version Control with Git and GitHub", "width": 1}, {"arrows": "to", "from": "Introduction to Version Control with Git and GitHub", "to": "Intermediate Version Control", "width": 1}]);
287287

288288
nodeColors = {};

0 commit comments

Comments
 (0)