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

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

    XMLWordPrintable

    Details

    • Testing Instructions:
      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 **
    • Affected Branches:
      MOODLE_36_STABLE, MOODLE_37_STABLE, MOODLE_38_STABLE, MOODLE_39_STABLE
    • Pull 3.8 Branch:
    • Pull 3.9 Branch:
    • Pull 3.10 Branch:
      MDL-65074-310
    • Pull Master Branch:

      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

            Assignee:
            hitteshahuja Hittesh Ahuja
            Reporter:
            bawjaws David Scotson
            Participants:
            Component watchers:
            Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Amy Groshek, David Scotson, Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Tim Hunt, Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze, Bas Brands
            Votes:
            1 Vote for this issue
            Watchers:
            7 Start watching this issue

              Dates

              Created:
              Updated:

                Time Tracking

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 35 minutes
                35m