From 5c4ee052f476157de988a24cd3ea7ec0e6b54ca4 Mon Sep 17 00:00:00 2001 From: Michael Ball Date: Mon, 29 Jul 2024 16:08:41 -0700 Subject: [PATCH 01/29] a11y: Minor CSS cleanup for headings and links --- css/bjc.css | 68 ++++++++++++++++++++++++-------------------- llab/css/default.css | 17 ++++------- 2 files changed, 42 insertions(+), 43 deletions(-) diff --git a/css/bjc.css b/css/bjc.css index 5524c4880..8e3b3c03b 100755 --- a/css/bjc.css +++ b/css/bjc.css @@ -1,35 +1,57 @@ @charset "UTF-8"; /** Basic HTML **/ -/* TODO: work sans is not loaded on most pages. */ +body { + width: 100%; + max-width: 100%; +} + +/** TODO: work sans is not loaded on most pages. +* .h1...h6 classes are used when you want something to /look/ like a heading, +* but it shouldn't be an actual heading tag +*/ body, -h1, -h2, -h3, -h4, -h5, -h6 { +h1, .h1, +h2, .h2, +h3, .h3, +h4, .h4, +h5, .h5, +h6, .h6, +.box-head { font-family: "work_sansregular", "Open Sans", sans-serif; color: #000; } +h3, .h3 { + margin-top: 20px; + padding-top: 10px; +} + +h4, .h4 { + padding: 5px 0px 0px 0px; +} + +/* Roughly visually aligns with the default h4 style + * To be used in curriculum boxes which contain subheadings. + */ +.box-head { + font-weight: bold; + font-size: 18px; +} + .anchor { padding-top: 80px; margin-top: -80px; } +/* should have >= 3:1 contrast with black, 4.5:1 with white */ a:visited { - color: #106070; /* darkened for a11y. */ - /* color: #248694; */ + color: #297694; } a, .dialogue a { - /* color: #28499F; */ - color: #3056AA; - /* color: #2a6496; */ - /* TODO-A11Y: We need to find better contrasting colors, or make links visual. */ - /* text-decoration: underline; */ + color: #3056AA; /* color: #28499F; */ } a.btn, @@ -60,15 +82,6 @@ a.btn, padding-right: 25px; } -body { - width: 100%; - max-width: 100%; -} - -h3 { - margin-top: 20px; -} - .blockquote { width: 90%; margin-left: auto; @@ -112,14 +125,6 @@ h3 { height: 2.5em; } -h4 { - padding: 5px 0px 0px 0px; -} - -h3 { - padding-top: 10px; -} - .full ul, .full ol { display: block; @@ -246,6 +251,7 @@ code.break { word-wrap: break-word; } +/* a11y: TODO: this color matches Snap!, but does not have enough contrast with white. */ var { padding: 0px; color: #f3761d; diff --git a/llab/css/default.css b/llab/css/default.css index 42ca39c6d..ac8e6e0b1 100755 --- a/llab/css/default.css +++ b/llab/css/default.css @@ -60,10 +60,6 @@ code, pre, tt, kbd, samp, var { font-family: 'Andale Mono', 'Menlo', Courier, monospace; } -a:visited { - color: #36BBCE; -} - .full { padding: 1em; width: 95%; @@ -122,16 +118,15 @@ h1 { margin: auto 0; } h1.title-small-screen { - margin: 14px 0 0 0; + margin: 16px 0 0 0; } + /* Override Bootstrap 3, exclude h1 */ -h2, h3, h4, h5, h6 { +h2, h3, h4, h5, h6 +.h2, .h3, .h4, .h5, .h6 { margin-top: 3px; padding: 8px 0; color: #000; -} - -h2, h3 { font-weight: 800; } @@ -188,10 +183,8 @@ code { /* Override bootstrap. */ /* Show a special div on small screens that isn't in the nav bar */ .title-small-screen { - margin: 1% 3%; display: none; - font-size: 1.5em; - font-weight: bold; + font-size: 1.8rem; color: #000; } From e8db11e927288e2113b97cee355dd2484220580f Mon Sep 17 00:00:00 2001 From: Michael Ball Date: Mon, 29 Jul 2024 16:09:03 -0700 Subject: [PATCH 02/29] Add example of using a .box-head class --- .../2-data-structures-art/2-quizzes.html | 40 ++++++++++--------- 1 file changed, 22 insertions(+), 18 deletions(-) diff --git a/cur/programming/2-complexity/2-data-structures-art/2-quizzes.html b/cur/programming/2-complexity/2-data-structures-art/2-quizzes.html index 09704e54f..225c14230 100644 --- a/cur/programming/2-complexity/2-data-structures-art/2-quizzes.html +++ b/cur/programming/2-complexity/2-data-structures-art/2-quizzes.html @@ -98,24 +98,28 @@

Planning a Quiz App

    -
  1. "U2L2-Quiz"Start a New Project called U2L2-Quiz 
  2. -
    AAP-1.D
    -
  3. Build the custom quiz item abstract data type (both the constructor and the two selectors).
  4. -
    -

    Specifying an Input Type

    -

    Your selectors expect a quiz item, i.e., a list, as input. You can make your blocks show what type of data they expect. It's not necessary in Snap! but, like assigning a color to a block, it can be a helpful reminder of what the block does and what type of input it expects. You've already seen input slots of several shapes, indicating different expected data types.

    -

    - In the Block Editor while creating a selector, click on a plus sign to enter an input name. Then... -

      -
    1. - Click on the arrow to the right of the input name:
      - create input name right arrow -
    2. -
    3. Choose the data type you want for that input. (For this project, you'll use the "text" and "list" input types.)
    4. -
    5. Click "OK."
    6. -
    -

    -
    +
  5. "U2L2-Quiz"Start a New Project called U2L2-Quiz 
    +
  6. +
  7. +
    AAP-1.D
    + Build the custom quiz item abstract data type (both the constructor and the two selectors). +
    +
    Specifying an Input Type
    +

    Your selectors expect a quiz item, i.e., a list, as input. You can make your blocks show what type of data they expect. It's not necessary in Snap! but, like assigning a color to a block, it can be a helpful reminder of what the block does and what type of input it expects. You've already seen input slots of several shapes, indicating different expected data types.

    +

    + In the Block Editor while creating a selector, click on a plus sign to enter an input name. Then... +

      +
    1. + Click on the arrow to the right of the input name:
      + create input name right arrow +
    2. +
    3. Choose the data type you want for that input. (For this project, you'll use the "text" and "list" input types.)
    4. +
    5. Click "OK."
    6. +
    +

    +
    +
  8. +
  9. Create a global variable to store your quiz items and initialize it as a list of items, using your constructor where appropriate.
  10. From e6fcbbea299da278a9e38d12ace55928bf3d4b66 Mon Sep 17 00:00:00 2001 From: Michael Ball Date: Sun, 4 Aug 2024 15:19:06 -0700 Subject: [PATCH 03/29] a11y: ensure no empty list elements are present. This issue was flagged by SiteImprove. --- llab/script/topic.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/llab/script/topic.js b/llab/script/topic.js index f10a845e4..3ce501f62 100644 --- a/llab/script/topic.js +++ b/llab/script/topic.js @@ -296,6 +296,10 @@ llab.renderSection = function (section, parent) { } } + if ($contentContainer.children().length == 0) { + $contentContainer.remove(); + } + $section.appendTo(parent); }; From 25587c5e0e1ac67ee6ac9ba90813ce3223dac645 Mon Sep 17 00:00:00 2001 From: Michael Ball Date: Thu, 8 Aug 2024 15:33:43 -0700 Subject: [PATCH 04/29] a11y: attempt to fix coloring --- css/bjc.css | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/css/bjc.css b/css/bjc.css index 8e3b3c03b..19403af3d 100755 --- a/css/bjc.css +++ b/css/bjc.css @@ -254,7 +254,10 @@ code.break { /* a11y: TODO: this color matches Snap!, but does not have enough contrast with white. */ var { padding: 0px; - color: #f3761d; + /* color: #f3761d; */ + color: #f1661d; + font-weight: bold; + font-size: 14pt; } .classIndent { From c70662cebd5a746b255f714bece06ec7970aa563 Mon Sep 17 00:00:00 2001 From: Mary Fries Date: Fri, 9 Aug 2024 19:03:16 -0400 Subject: [PATCH 05/29] a11y - changing

    to

    --- css/bjc.css | 2 ++ .../2-creating-a-snap-account.es.html | 6 ++--- .../2-creating-a-snap-account.html | 6 ++--- .../3-loading-mobile-device.es.html | 12 +++++----- .../3-loading-mobile-device.html | 12 +++++----- .../1-pair-programming.es.html | 2 +- .../1-pair-programming.html | 2 +- .../2-gossip-and-greet/3-customizing.es.html | 8 +++---- .../2-gossip-and-greet/3-customizing.html | 8 +++---- .../4-making-a-new-block.es.html | 4 ++-- .../4-making-a-new-block.html | 4 ++-- .../3-drawing/1-exploring-motion.es.html | 2 +- .../3-drawing/1-exploring-motion.html | 2 +- .../2-exploring-snap-drawing-motion.es.html | 2 +- .../2-exploring-snap-drawing-motion.html | 2 +- .../3-drawing/3-blocks-with-inputs.es.html | 4 ++-- .../3-drawing/3-blocks-with-inputs.html | 4 ++-- .../3-drawing/4-modify-your-pinwheel.es.html | 2 +- .../3-drawing/4-modify-your-pinwheel.html | 2 +- .../3-drawing/5-remix-your-pinwheel.es.html | 2 +- .../3-drawing/5-remix-your-pinwheel.html | 2 +- .../semi-old/1-exploring-motion.html | 2 +- .../semi-old/3-blocks-with-inputs.html | 4 ++-- .../semi-old/4-modify-your-pinwheel.html | 2 +- .../semi-old/7-graphics-and-art.html | 2 +- .../1-following-sprites.es.html | 4 ++-- .../1-following-sprites.html | 4 ++-- .../1-custom-blocks.html | 2 +- .../2-adding-an-input.html | 2 +- .../1-number-guessing-game.es.html | 2 +- .../1-number-guessing-game.html | 2 +- .../1-variables-games/4-keeping-score.es.html | 6 ++--- .../1-variables-games/4-keeping-score.html | 6 ++--- .../old/4-importing-exporting.html | 6 ++--- .../2-data-structures-art/2-quizzes.es.html | 2 +- .../2-combining-predicates.es.html | 2 +- .../3-predicates/2-combining-predicates.html | 2 +- .../2-math-predicates.es.html | 6 ++--- .../2-math-predicates.html | 6 ++--- .../old/debugging/debugging-summary.html | 22 +++++++++---------- .../optional-projects/3-mastermind.es.html | 2 +- .../optional-projects/3-mastermind.html | 2 +- .../future/3-click-points.es.html | 2 +- .../future/3-click-points.html | 2 +- .../future/4-mandala.es.html | 2 +- .../future/4-the-for-each-block.es.html | 4 ++-- .../future/4-the-for-each-block.html | 4 ++-- .../2-contact-list/1-build-the-list.es.html | 4 ++-- .../2-contact-list/1-build-the-list.html | 4 ++-- .../2-contact-list/2-adding-contact.es.html | 2 +- .../2-contact-list/2-adding-contact.html | 2 +- .../2-contact-list/3-modifying-adt.es.html | 2 +- .../2-contact-list/3-modifying-adt.html | 2 +- .../2-contact-list/old/2-modifying-adt.html | 2 +- .../unused-new-stuff/5-how-old.html | 2 +- .../4-robots-ai/3-implications.es.html | 2 +- .../3-lists/4-robots-ai/3-implications.html | 2 +- .../optional-projects/4-music-project.es.html | 2 +- .../optional-projects/4-music-project.html | 2 +- .../old/Y2Version/2-cryptosecurity.html | 2 +- .../old/mf/1-freedom-of-speech.html | 2 +- .../6-web-data/2-web-scraping-techniques.html | 2 +- .../2-halting-problem.es.html | 10 ++++----- .../2-halting-problem.html | 10 ++++----- .../6-tic-tac-toe/1-review.es.html | 2 +- .../03-software-languages.es.html | 6 ++--- .../1-abstraction/03-software-languages.html | 6 ++--- .../1-abstraction/04-software-libraries.html | 2 +- .../06-digital-architecture.es.html | 4 ++-- .../06-digital-architecture.html | 4 ++-- .../2-binary-sequences.html | 4 ++-- .../CSTA2019/1-solving-word-puzzle.html | 2 +- cur/programming/CSTA2019/2-fractal-art.html | 2 +- cur/programming/CSTA2020/quiz-app.html | 4 ++-- cur/programming/CSTANE2020/click-alonzo.html | 8 +++---- .../CSTANE2020/data-processing.html | 2 +- cur/programming/CSTANE2020/quiz-app.html | 2 +- .../aprilpd/processing-student-grades.html | 2 +- 78 files changed, 149 insertions(+), 147 deletions(-) diff --git a/css/bjc.css b/css/bjc.css index 8e3b3c03b..643c22251 100755 --- a/css/bjc.css +++ b/css/bjc.css @@ -37,6 +37,8 @@ h4, .h4 { .box-head { font-weight: bold; font-size: 18px; + margin-top: 0px; + padding: 5px 0px 0px 0px; } .anchor { diff --git a/cur/programming/1-introduction/1-building-an-app/2-creating-a-snap-account.es.html b/cur/programming/1-introduction/1-building-an-app/2-creating-a-snap-account.es.html index ec9cb4442..3cb5b709a 100644 --- a/cur/programming/1-introduction/1-building-an-app/2-creating-a-snap-account.es.html +++ b/cur/programming/1-introduction/1-building-an-app/2-creating-a-snap-account.es.html @@ -17,7 +17,7 @@

    Guardar proyectos Snap!

  11. Hay diferentes formas de guardar los proyectos de Snap! Algunos de ellos implican iniciar sesión o crear una cuenta de Snap! Tu profesor te dirá qué opción usar.
    -

    Opción A: Guarde su proyecto en tu computadora

    +

    Opción A: Guarde su proyecto en tu computadora

    -

    Opción B: Tu profesor te ha creado una cuenta

    +

    Opción B: Tu profesor te ha creado una cuenta

    -

    Opción C: Crea una cuenta de Snap! con tu correo electrónico personal

    +

    Opción C: Crea una cuenta de Snap! con tu correo electrónico personal

    Se trata de una cuenta de Snap! en la que cualquier solicitud de restablecimiento de contraseña se enviará a tu cuenta de correo electrónico personal.
    diff --git a/cur/programming/1-introduction/1-building-an-app/2-creating-a-snap-account.html b/cur/programming/1-introduction/1-building-an-app/2-creating-a-snap-account.html index e18153d97..a5371ce9d 100644 --- a/cur/programming/1-introduction/1-building-an-app/2-creating-a-snap-account.html +++ b/cur/programming/1-introduction/1-building-an-app/2-creating-a-snap-account.html @@ -17,7 +17,7 @@

    Saving Snap! Projects

  12. There are different ways to save Snap! projects. Some of them involve logging in or creating a Snap! account. Your teacher will let you know which option to use.
    -
    Option A: Save your project to your computer
    +

    Option A: Save your project to your computer

    -
    Option B: Your teacher has set up an account for you
    +

    Option B: Your teacher has set up an account for you

    Your teacher will let you know your Snap! username and password. If you ever need to reset your password, the request will go to your teacher.
    @@ -52,7 +52,7 @@

    Saving Snap! Projects

    -
    Option C: Create a Snap! account with a personal email
    +

    Option C: Create a Snap! account with a personal email

    This is a Snap! account where any password reset requests will go to your personal email account. Your teacher may ask you to use their email address.
    diff --git a/cur/programming/1-introduction/1-building-an-app/3-loading-mobile-device.es.html b/cur/programming/1-introduction/1-building-an-app/3-loading-mobile-device.es.html index 13ebb88bd..08623fcd8 100644 --- a/cur/programming/1-introduction/1-building-an-app/3-loading-mobile-device.es.html +++ b/cur/programming/1-introduction/1-building-an-app/3-loading-mobile-device.es.html @@ -17,7 +17,7 @@

    Compartir tu juego

  13. Puedes utilizar cualquiera de las opciones siguientes si tienes una cuenta de Snap! Si no tiene una cuenta de Snap!, deberá utilizar la opción A.
    -

    Opción A: Comparte tu proyecto como archivo

    +

    Opción A: Comparte tu proyecto como archivo

    El envío de un archivo XML envía una versión estática de tu proyecto.
    @@ -29,12 +29,12 @@

    Opción A: Comparte tu proyecto como archivo

    -

    Opción B: Comparte tu proyecto como un enlace

    +

    Opción B: Comparte tu proyecto como un enlace

    Al “Compartir" tu proyecto se creará un enlace que permitirá a otros ver la versión guardada más reciente de tu proyecto.