mitodl / ocw-hugo-themes

A Hugo theme for building OCW websites
BSD 3-Clause "New" or "Revised" License
5 stars 4 forks source link

Make multiple choice quiz buttons keyboard-interactive #1253

Closed pt2302 closed 1 year ago

pt2302 commented 1 year ago

What are the relevant tickets?

Closes https://github.com/mitodl/ocw-hugo-themes/issues/1252.

Description (What does it do?)

This PR makes the Show Solution/Hide Solution and Check buttons in multiple-choice quizzes keyboard-interactive, which is needed for improved accessibility.

How can this be tested?

  1. Spin up a course with a multiple-choice quiz, for example yarn start course 15.071-spring-2017.
  2. Navigate to a page with a multiple-choice quiz, such as http://localhost:3000/pages/logistic-regression/the-framingham-heart-study-evaluating-risk-factors-to-save-lives/quick-question-225/.
  3. Verify that the Check and Show Solution buttons are keyboard-interactive. For the Check button, this means selecting one of the quiz options and then using the keyboard to push the Check button. For the Show Solution button, this does not require one of the options to be selected first.
github-actions[bot] commented 1 year ago

Netlify Deployments:
www: https://ocw-hugo-themes-www-pr-1253--ocw-next.netlify.app/
Course v2: https://ocw-hugo-themes-course-v2-pr-1253--ocw-next.netlify.app/