Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-65074

Quiz navigation buttons use part of btn-secondary styles, can disappear

    XMLWordPrintable

Details

    • MOODLE_310_STABLE, MOODLE_36_STABLE, MOODLE_37_STABLE, MOODLE_38_STABLE, MOODLE_39_STABLE, MOODLE_400_STABLE
    • MOODLE_38_STABLE, MOODLE_39_STABLE
    • Hide

      Before Patch has been applied:

      1. As an admin, login 
      2. Go to  Dashboard > Site administration > Appearance > Themes > Boost
      3. Under General settings, change theme preset to plain.css
      4. Save Changes.
      5. Create a new couse
      6. Add a new quiz to the course with three questions.
      7. Attempt Quiz
      8. You will see that the quiz navigation boxes are missing i.e hidden

      After Patch has been applied:

      1. As an admin, login 
      2. Go to  Dashboard > Site administration > Appearance > Themes > Boost
      3. Under General settings, change theme preset to plain.css
      4. Save Changes.
      5. Go to the same course with the same quiz
      6. Attempt Quiz
      7. You will see that the quiz navigation boxes are now visible
      8. Repeat Step 2 
      9. Change to default.css
      10. You will see that the quiz navigation boxes are now visible
      Show
      Before Patch has been applied: As an admin, login  Go to  Dashboard > Site administration > Appearance > Themes > Boost Under General settings, change theme preset to plain.css Save Changes. Create a new couse Add a new quiz to the course with three questions. Attempt Quiz You will see that the quiz navigation boxes are missing i.e hidden After Patch has been applied: As an admin, login  Go to  Dashboard > Site administration > Appearance > Themes > Boost Under General settings, change theme preset to plain.css Save Changes. Go to the same course with the same quiz Attempt Quiz You will see that the quiz navigation boxes are now visible Repeat Step 2  Change to default.css You will see that the quiz navigation boxes are now visible

    Description

      The quiz navigation buttons in the side bar will become invisible if you change the btn-secondary color to be white (which would generally be a side effect of turning the button color itself darker to the point that dark text no longer works on it).

      This is because the buttons declare themselves as being .btn-secondary and so inherit the colors from that, but then override only the background to be $card-bg, without changing the text color.

      If $card-bg and btn-secondary text color are similar, the buttons become unreadable. if they're identical then no-one will be able to read them, but if they're just close then it'll be hard for people with vision impairment to read them.

      I think the general solution is not to use btn-secondary on buttons that are intended to have a visual display different from btn-secondary, so possibly some special btn- class for these buttons, as they are quite unique in their behaviour and appearance. Possibly this should use color-yiq to figure out if the text should be dark or light given the buton background color.

       

       

      Attachments

        Activity

          People

            hitteshahuja Hittesh Ahuja
            bawjaws David Scotson
            Bas Brands Bas Brands
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Anna Carissa Sadia Anna Carissa Sadia
            Andrew Lyons, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze, Stevani Andolo, Amy Groshek, David Scotson, Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Laurent David, Raquel Ortega, Sara Arjona (@sarjona), Tim Hunt, Andrew Lyons, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze, Stevani Andolo, Huong Nguyen, Bas Brands, Mathew May
            Votes:
            1 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              9/Nov/20

              Time Tracking

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 hours
                2h