Skip to content

Commit

Permalink
a11y: progress fixing some smaller issues in bjc csp course
Browse files Browse the repository at this point in the history
  • Loading branch information
cycomachead committed Jul 4, 2024
1 parent 152b33c commit fef6c90
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -298,25 +298,25 @@ <h2>Paralelismo</h2>
</ul>
</div>
<div class="choice" identifier="c1">
<div class="text"><span class="katex">\frac{18}{14}</span></div>
<div class="text"><span class="katex" title="18/14">\frac{18}{14}</span></div>
<div class="feedback">
&iexcl;Correcto!
</div>
</div>
<div class="choice" identifier="c2">
<div class="text"><span class="katex">\frac{14}{18}</span></div>
<div class="text"><span class="katex" title="14/18">\frac{14}{18}</span></div>
<div class="feedback">
La aceleraci&oacute;n se calcula dividiendo el tiempo secuencial por el tiempo paralelo.
</div>
</div>
<div class="choice" identifier="c3">
<div class="text"><span class="katex">\frac{18}{6}</span></div>
<div class="text"><span class="katex" title="18/6">\frac{18}{6}</span></div>
<div class="feedback">
<code>Transmitir y esperar</code> espera hasta que todas las tareas que comenz&oacute; han terminado.
</div>
</div>
<div class="choice" identifier="c4">
<div class="text"><span class="katex">\frac{18}{8}</span></div>
<div class="text"><span class="katex" title="18/8">\frac{18}{8}</span></div>
<div class="feedback">
El tiempo paralelo m&aacute;s largo s&iacute; importa, pero no es lo &uacute;nico que contribuye al tiempo paralelo total.
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -296,25 +296,25 @@ <h2>Parallelism</h2>
</ul>
</div>
<div class="choice" identifier="c1">
<div class="text"><span class="katex">\frac{18}{14}</span></div>
<div class="text"><span class="katex" title="18/14">\frac{18}{14}</span></div>
<div class="feedback">
Correct!
</div>
</div>
<div class="choice" identifier="c2">
<div class="text"><span class="katex">\frac{14}{18}</span></div>
<div class="text"><span class="katex" title="14/18">\frac{14}{18}</span></div>
<div class="feedback">
Speedup is calculated by dividing the sequential time by the parallel time.
</div>
</div>
<div class="choice" identifier="c3">
<div class="text"><span class="katex">\frac{18}{6}</span></div>
<div class="text"><span class="katex" title="18/6">\frac{18}{6}</span></div>
<div class="feedback">
<code>Broadcast and wait</code> waits until all the tasks that it started have finished.
</div>
</div>
<div class="choice" identifier="c4">
<div class="text"><span class="katex">\frac{18}{8}</span></div>
<div class="text"><span class="katex" title="18/8">\frac{18}{8}</span></div>
<div class="feedback">
The longest parallel time does matter, but it's not the only thing that contributes to the total parallel time.
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ <h2>Analyzing Global Health Data</h2>
<li>What does the size of each point indicate?</li>
<li>What does the slider at the bottom do?</li>
</ol>
<iframe width="800" height="650" frameborder="0" scrolling="no" marginwidth="0" marginheight="0" src="https://www.google.com/publicdata/embed?ds=d5bncppjof8f9_&amp;ctype=b&amp;strail=false&amp;bcs=d&amp;nselm=s&amp;met_x=sp_dyn_le00_in&amp;scale_x=lin&amp;ind_x=false&amp;met_y=sp_dyn_tfrt_in&amp;scale_y=lin&amp;ind_y=false&amp;met_s=sp_pop_totl&amp;scale_s=lin&amp;ind_s=false&amp;dimp_c=country:region&amp;ifdim=country&amp;tunit=Y&amp;pit=1437710400000&amp;hl=en_US&amp;dl=en_US&amp;ind=false&amp;icfg&amp;iconSize=0.5"></iframe>
<iframe title="Google Life Expectancy Data Visualizer" width="800" height="650" frameborder="0" scrolling="no" marginwidth="0" marginheight="0" src="https://www.google.com/publicdata/embed?ds=d5bncppjof8f9_&amp;ctype=b&amp;strail=false&amp;bcs=d&amp;nselm=s&amp;met_x=sp_dyn_le00_in&amp;scale_x=lin&amp;ind_x=false&amp;met_y=sp_dyn_tfrt_in&amp;scale_y=lin&amp;ind_y=false&amp;met_s=sp_pop_totl&amp;scale_s=lin&amp;ind_s=false&amp;dimp_c=country:region&amp;ifdim=country&amp;tunit=Y&amp;pit=1437710400000&amp;hl=en_US&amp;dl=en_US&amp;ind=false&amp;icfg&amp;iconSize=0.5" data-a11y-external-errors="true"></iframe>
</li>
<li>
<img class="imageRight" src="/bjc-r/img/icons/talk-with-your-partner-mini.png" alt="Talk with Your Partner" title="Talk with Your Partner" />
Expand Down
8 changes: 4 additions & 4 deletions cur/programming/summaries/assessment-data5.html
Original file line number Diff line number Diff line change
Expand Up @@ -259,25 +259,25 @@ <h3>Lab 1: Search Algorithms and Efficiency</h3>
</ul>
</div>
<div class="choice" identifier="c1">
<div class="text"><span class="katex">\frac{18}{14}</span></div>
<div class="text"><span class="katex" title="18/4">\frac{18}{14}</span></div>
<div class="feedback">
Correct!
</div>
</div>
<div class="choice" identifier="c2">
<div class="text"><span class="katex">\frac{14}{18}</span></div>
<div class="text"><span class="katex" title="14/18">\frac{14}{18}</span></div>
<div class="feedback">
Speedup is calculated by dividing the sequential time by the parallel time.
</div>
</div>
<div class="choice" identifier="c3">
<div class="text"><span class="katex">\frac{18}{6}</span></div>
<div class="text"><span class="katex" title="18/6">\frac{18}{6}</span></div>
<div class="feedback">
<code>Broadcast and wait</code> waits until all the tasks that it started have finished.
</div>
</div>
<div class="choice" identifier="c4">
<div class="text"><span class="katex">\frac{18}{8}</span></div>
<div class="text"><span class="katex" title="18/8">\frac{18}{8}</span></div>
<div class="feedback">
The longest parallel time does matter, but it's not the only thing that contributes to the total parallel time.
</div>
Expand Down
30 changes: 28 additions & 2 deletions utilities/spec/accessibility_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ def a11y_test_cases(course, url)
# Allows CI to run only the tests for a specific course AND standard.
wcag20_tags = test_tags([course, :wcag20])
wcag22_tags = test_tags([course, :wcag22])
subset_tags = test_tags([course, :subset])

# ====== AXE Configuration
# Axe-core test standards groups
Expand All @@ -90,8 +91,16 @@ def a11y_test_cases(course, url)

# These are elements that are not required to be accessible
excluded_elements = [
'[data-a11y-external-errors="true"]', # should be used very sparingly.
'.js-openProdLink', # OK to exclude, only in development.
# should be used very sparingly.
'[data-a11y-external-errors="true"]',
# Developer Tools, which aren't visible in production
'.js-openProdLink',
'.todo',
'.comment',
'.commentBig',
'.ap-standard',
'.csta-standard',
# TODO: items below here **must** be fixed eventually.
'var', # Snap! elements don't have enough color contrast.
]

Expand Down Expand Up @@ -120,6 +129,23 @@ def a11y_test_cases(course, url)
.excluding(*excluded_elements)
end

# This test should normally be commented out.
# it allows you to easily/temporary update a subset of axe rules and run just those.
# heading-order
# color-contrast
it 'passes a subset a11y rules', **subset_tags do
expect(page).to be_axe_clean
.checking_only(%i|
duplicate-id
listitem
frame-title
image-alt
label
area-alt
|)
.excluding(*excluded_elements)
end

it 'has no broken links', course => true do
passed_test = true
page.all('a').each do |link|
Expand Down

0 comments on commit fef6c90

Please sign in to comment.