Skip to content

Commit

Permalink
Merge branch 'master' into middle-school
Browse files Browse the repository at this point in the history
* master:
  Set title on embedded iframes, add robots.txt
  a11y: sigh, why isnt this page passing the heading order test?
  delete part of old comment causing test failure...
  a11y: bump axe versions
  a11y: small teachers guide fixes
  a11y: fix one last sparks dev comment; fix compare page color
  a11y:fix some styleguide issues
  a11y: Fix a blue button issue on the old compare page
  a11y: add title to iframe
  a11y: Fix some heading issues in sparks -- just dev comments
  sparks-a11y: replace all h4 elements as div.box-head
  a11y: minor tweaks, add more urls to be tested
  Add a general section to the workflow file
  Fix a small heading order on the create test
  a11y: spec testing/refactoring
  Update gemfile
  • Loading branch information
cycomachead committed Oct 16, 2024
2 parents 4082743 + 4846ecd commit cc8003d
Show file tree
Hide file tree
Showing 40 changed files with 656 additions and 628 deletions.
9 changes: 4 additions & 5 deletions .github/workflows/specs.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Run rspec tests

on:
on:
- pull_request
- push
- workflow_dispatch
Expand All @@ -9,26 +9,25 @@ jobs:
a11y:
runs-on: ubuntu-latest
continue-on-error: true
# env:
# BUNDLE_GEMFILE: utilities/Gemfile
strategy:
matrix:
# The files in /bjc-r/course w/o a .html extension
# The files in /bjc-r/course/ (excluding the .html)
# These correspond to rspec tags for each test run.
course:
- bjc4nyc
- bjc4nyc.es
- sparks
- bjc4nyc_teacher
- sparks-teacher
- general
suite:
- wcag20
- wcag22
steps:
- uses: actions/checkout@v3
- uses: ruby/setup-ruby@v1
with:
# ruby-version: 3.2.2
# Specified by .ruby-version
bundler-cache: true
- name: a11y tests
run: bundle exec rspec utilities/specs --tag ${{ matrix.course }}_${{ matrix.suite }}
Expand Down
28 changes: 17 additions & 11 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,20 @@ source 'https://rubygems.org'

ruby file: '.ruby-version'

gem 'axe-core-capybara'
gem 'axe-core-rspec'
gem 'capybara'
gem 'capybara-screenshot'
gem 'nokogiri'
# TODO: Replace this gem with a better default...
gem 'rack-jekyll'
gem 'rspec'
gem 'selenium-webdriver'
gem 'webdrivers'
gem 'webrick'
group :development, :test do
# Testing framework
gem 'rspec'
# Browser-based testing hooks
gem 'capybara'
gem 'capybara-screenshot'
gem 'selenium-webdriver'
gem 'webdrivers'
# Accessibility testing tools
gem 'axe-core-capybara'
gem 'axe-core-rspec'
# Testing supports
gem 'nokogiri'
gem 'rack', '~> 3'
gem 'rackup'
gem 'webrick'
end
121 changes: 11 additions & 110 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,20 @@ GEM
specs:
addressable (2.8.6)
public_suffix (>= 2.0.2, < 6.0)
axe-core-api (4.9.1)
axe-core-api (4.10.0)
dumb_delegator
virtus
axe-core-capybara (4.9.1)
axe-core-api (= 4.9.1)
axe-core-capybara (4.10.0)
axe-core-api (= 4.10.0)
dumb_delegator
axe-core-rspec (4.9.1)
axe-core-api (= 4.9.1)
axe-core-rspec (4.10.0)
axe-core-api (= 4.10.0)
dumb_delegator
virtus
axiom-types (0.1.1)
descendants_tracker (~> 0.0.4)
ice_nine (~> 0.11.0)
thread_safe (~> 0.3, >= 0.3.1)
bigdecimal (3.1.8)
capybara (3.40.0)
addressable
matrix
Expand All @@ -33,82 +32,15 @@ GEM
childprocess (5.0.0)
coercible (1.0.0)
descendants_tracker (~> 0.0.1)
colorator (1.1.0)
concurrent-ruby (1.3.3)
descendants_tracker (0.0.4)
thread_safe (~> 0.3, >= 0.3.1)
diff-lcs (1.5.1)
dumb_delegator (1.0.0)
em-websocket (0.5.3)
eventmachine (>= 0.12.9)
http_parser.rb (~> 0)
eventmachine (1.2.7)
ffi (1.17.0-aarch64-linux-gnu)
ffi (1.17.0-aarch64-linux-musl)
ffi (1.17.0-arm-linux-gnu)
ffi (1.17.0-arm-linux-musl)
ffi (1.17.0-arm64-darwin)
ffi (1.17.0-x86-linux-gnu)
ffi (1.17.0-x86-linux-musl)
ffi (1.17.0-x86_64-darwin)
ffi (1.17.0-x86_64-linux-gnu)
ffi (1.17.0-x86_64-linux-musl)
forwardable-extended (2.6.0)
google-protobuf (4.27.1)
bigdecimal
rake (>= 13)
google-protobuf (4.27.1-aarch64-linux)
bigdecimal
rake (>= 13)
google-protobuf (4.27.1-arm64-darwin)
bigdecimal
rake (>= 13)
google-protobuf (4.27.1-x86-linux)
bigdecimal
rake (>= 13)
google-protobuf (4.27.1-x86_64-darwin)
bigdecimal
rake (>= 13)
google-protobuf (4.27.1-x86_64-linux)
bigdecimal
rake (>= 13)
http_parser.rb (0.8.0)
i18n (1.14.5)
concurrent-ruby (~> 1.0)
ice_nine (0.11.2)
jekyll (4.3.3)
addressable (~> 2.4)
colorator (~> 1.0)
em-websocket (~> 0.5)
i18n (~> 1.0)
jekyll-sass-converter (>= 2.0, < 4.0)
jekyll-watch (~> 2.0)
kramdown (~> 2.3, >= 2.3.1)
kramdown-parser-gfm (~> 1.0)
liquid (~> 4.0)
mercenary (>= 0.3.6, < 0.5)
pathutil (~> 0.9)
rouge (>= 3.0, < 5.0)
safe_yaml (~> 1.0)
terminal-table (>= 1.8, < 4.0)
webrick (~> 1.7)
jekyll-sass-converter (3.0.0)
sass-embedded (~> 1.54)
jekyll-watch (2.2.1)
listen (~> 3.0)
kramdown (2.4.0)
rexml
kramdown-parser-gfm (1.1.0)
kramdown (~> 2.0)
launchy (3.0.1)
addressable (~> 2.8)
childprocess (~> 5.0)
liquid (4.0.4)
listen (3.9.0)
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
matrix (0.4.2)
mercenary (0.4.0)
mini_mime (1.1.5)
nokogiri (1.16.6-aarch64-linux)
racc (~> 1.4)
Expand All @@ -122,25 +54,17 @@ GEM
racc (~> 1.4)
nokogiri (1.16.6-x86_64-linux)
racc (~> 1.4)
pathutil (0.16.2)
forwardable-extended (~> 2.6)
public_suffix (5.1.1)
racc (1.8.0)
rack (1.6.13)
rack-jekyll (0.5.0)
jekyll (>= 1.3)
listen (>= 1.3)
rack (~> 1.5)
rack (3.1.7)
rack-test (2.1.0)
rack (>= 1.3)
rake (13.2.1)
rb-fsevent (0.11.2)
rb-inotify (0.11.1)
ffi (~> 1.0)
rackup (2.1.0)
rack (>= 3)
webrick (~> 1.8)
regexp_parser (2.9.2)
rexml (3.3.2)
strscan
rouge (4.3.0)
rspec (3.13.0)
rspec-core (~> 3.13.0)
rspec-expectations (~> 3.13.0)
Expand All @@ -155,36 +79,12 @@ GEM
rspec-support (~> 3.13.0)
rspec-support (3.13.1)
rubyzip (2.3.2)
safe_yaml (1.0.5)
sass-embedded (1.77.5-aarch64-linux-gnu)
google-protobuf (>= 3.25, < 5.0)
sass-embedded (1.77.5-aarch64-linux-musl)
google-protobuf (>= 3.25, < 5.0)
sass-embedded (1.77.5-arm-linux-gnueabihf)
google-protobuf (>= 3.25, < 5.0)
sass-embedded (1.77.5-arm-linux-musleabihf)
google-protobuf (>= 3.25, < 5.0)
sass-embedded (1.77.5-arm64-darwin)
google-protobuf (>= 3.25, < 5.0)
sass-embedded (1.77.5-x86-linux-gnu)
google-protobuf (>= 3.25, < 5.0)
sass-embedded (1.77.5-x86-linux-musl)
google-protobuf (>= 3.25, < 5.0)
sass-embedded (1.77.5-x86_64-darwin)
google-protobuf (>= 3.25, < 5.0)
sass-embedded (1.77.5-x86_64-linux-gnu)
google-protobuf (>= 3.25, < 5.0)
sass-embedded (1.77.5-x86_64-linux-musl)
google-protobuf (>= 3.25, < 5.0)
selenium-webdriver (4.10.0)
rexml (~> 3.2, >= 3.2.5)
rubyzip (>= 1.2.2, < 3.0)
websocket (~> 1.0)
strscan (3.1.0)
terminal-table (3.0.2)
unicode-display_width (>= 1.1.1, < 3)
thread_safe (0.3.6)
unicode-display_width (2.5.0)
virtus (2.0.0)
axiom-types (~> 0.1)
coercible (~> 1.0)
Expand Down Expand Up @@ -222,7 +122,8 @@ DEPENDENCIES
capybara
capybara-screenshot
nokogiri
rack-jekyll
rack (~> 3)
rackup
rspec
selenium-webdriver
webdrivers
Expand Down
32 changes: 8 additions & 24 deletions css/bjc.css
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ h4, .h4 {
}

/* should have >= 3:1 contrast with black, 4.5:1 with white */
a:visited {
a:visited:not(.btn-primary) {
color: #297694;
}

Expand Down Expand Up @@ -945,32 +945,16 @@ div.socialorange {
background-color: #f4c480;
}

ul.tight li {
padding-top: 0px;
padding-bottom: 0px;
}

/* Blue button links */
div.socialorange a {
/* brighter + underlined links for accessibility */
color: #1049CC;
text-decoration: underline;

a.blbtn {
color: #fff;
background-color: #428bca;
border-color: #357ebd;
display: inline-block;
padding: 6px 12px;
margin-bottom: 0;
font-size: 14px;
font-weight: normal;
line-height: 1.428571429;
border: 1px solid transparent;
border-radius: 4px;
}

a.blbtn:hover {
color: #333 !important;
}
a.blbtn:visited {
color: #fff !important;
ul.tight li {
padding-top: 0px;
padding-bottom: 0px;
}

/* edX BJC Videos */
Expand Down
2 changes: 1 addition & 1 deletion cur/compare.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<body>
<h2>Comparison with CSP Framework</h2>
<div style="float:right; padding:20px;">
<a href="/bjc-r/course/bjc4nyc.html" class="blbtn">BJC Curriculum</a>
<a href="/bjc-r/course/bjc4nyc.html" class="btn btn-primary">BJC Curriculum</a>
</div>
<p>Computer programming can be immensely satisfying. You get to be inventive and creative. Programming gives you a kind of authorship and <em>control</em> that's quite beyond what people mostly can get in other activities. It's what Seymour Papert called "hard fun," fun precisely <em>because</em> it is mind-stretching but still under your own control. And, because you can judge correctness yourself—your program either works the way you want or it doesn't—you become the judge, not the judged. If the program doesn't work, it's not a failure but a work in progress; you fix it, alone or with ideas from others. If it does work, you may still want to embellish it with new ideas or more elegant structure. That view of learning—that one can always fix what needs fixing and improve what's already good—and the sense of authority that one gains by being a creator are known to be valuable to kids (and adults). And, of course, the skills and ideas behind programming—the computer <em>science</em> of it—are valuable. Programming <em>is</em> a game of skill, like chess but without the competitive aspect, and with useful results beyond the act of programming itself. These reasons, alone, are enough to make us want <strong>all kids</strong> to have the opportunity to experience the joy of programming.</p>
<p>Given the chance to learn, programming can also be accessible to many students who have not had success in areas they associate with computers and mathematics and science, or who do not picture themselves as programmers. Precisely <em>because</em> you can see for yourself how your program is behaving, you are in a better position to know what steps to take to improve it than you are in most other subjects.</p>
Expand Down
16 changes: 8 additions & 8 deletions cur/performance-tasks/create-task/6-reference.es.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,18 @@ <h2>Preparar tu <em>Personalized Project Reference</em></h2>
<div class="learn">
<p><strong>En esta página</strong>, prepararás tu <em>Personalized Project Reference sheet</em> (hoja de referencia del proyecto personalizada) basada en tu proyecto de Snap<em>!</em> para utilizar en el examen de AP.</p>
</div>

<div class="takeNote">
<p>
Hay dos lugares diferentes donde enviar imágenes de tu código al College Board:
Hay dos lugares diferentes donde enviar imágenes de tu código al College Board:
<ul>
<li>Para el Componente A (código del programa), enviarás una imagen de <em>todo</em> tu código, incluyendo comentarios y referencias.</li>
<li>Para el Componente C (<em>Personalized Project Reference</em>), enviarás imágenes de <em>partes específicas</em> de tu código y no puedes incluir comentarios.</li>
</ul>
Durante la parte de respuesta escrita en el examen de AP, <em>solo</em> puedes utilizar lo que está en tu <em>Personalized Project Reference sheet</em>.
</p>
</div>

<div class="forYouToDo">
<ol>
<li>
Expand All @@ -45,11 +45,11 @@ <h2>Preparar tu <em>Personalized Project Reference</em></h2>
</ol>
</li>
<li>
Crea tu <em>Personalized Project Reference sheet</em> con los cuatro segmentos de código que identificaste anteriormente.
Crea tu <em>Personalized Project Reference sheet</em> con los cuatro segmentos de código que identificaste anteriormente.
<div class="takeNote">Durante el examen de AP, tu escuela proporcionará una impresión de tu hoja <em>Personalized Project Reference</em> para que la uses en el examen. Para la <em>Create Task</em> de práctica, si te das cuenta que no puedes responder a algunas de las preguntas de escritura en la página siguiente (<em>Write About Your Proyect</em>, Escribir sobre tu proyecto) utilizando solo los cuatro segmentos de código que seleccionaste, entonces puedes revisar tu <em>Personalized Project Reference </em>. En el examen de AP real, <em>no podrás revisar tu Personalized Project Reference</em>, así que utiliza la <em>Create Task</em> de práctica para pensar cómo debe ser un buen segmento de código para incluir en tu <em>Personalized Project Reference sheet</em>. En la tarea de creación oficial, cuando crees tu <em>Personalized Project Reference</em> para el examen de AP, piensa de antemano si podrás responder correctamente a las preguntas de la página siguiente. </div>
</li>
<div class="narrower">
<h4><strong>Mostrar el código</strong></h4>
<h3 class="box-head">Mostrar el código</h3>
<p>
Snap<em>!</em> tiene dos formas convenientes de obtener archivos de imagen que muestren parte o todo tu código:
<ul>
Expand Down Expand Up @@ -77,7 +77,7 @@ <h4><strong>Mostrar el código</strong></h4>
</div>
</ol>
</div>


</body>
</html>
</html>
Loading

0 comments on commit cc8003d

Please sign in to comment.