From 93873cd84574c1068a62b174e42627a964767c85 Mon Sep 17 00:00:00 2001 From: Chris Deery <3932645+cdeery@users.noreply.github.com> Date: Fri, 1 Oct 2021 14:22:58 -0400 Subject: [PATCH] feat: [AA-906] A11y changes for buttons to be seen as radio buttons --- .../widgets/WeeklyLearningGoalCard.jsx | 66 ++++++++++++++++--- 1 file changed, 57 insertions(+), 9 deletions(-) diff --git a/src/course-home/outline-tab/widgets/WeeklyLearningGoalCard.jsx b/src/course-home/outline-tab/widgets/WeeklyLearningGoalCard.jsx index d5dafcf1..a619c5ca 100644 --- a/src/course-home/outline-tab/widgets/WeeklyLearningGoalCard.jsx +++ b/src/course-home/outline-tab/widgets/WeeklyLearningGoalCard.jsx @@ -30,8 +30,11 @@ function WeeklyLearningGoalCard({ Object.freeze(weeklyLearningGoalLevels); function handleSelect(days) { + // Set the subscription button if this is the first time selecting a goal + const selectReminders = daysPerWeekGoal === null ? true : isGetReminderSelected; + setGetReminderSelected(selectReminders); setDaysPerWeekGoal(days); - saveWeeklyCourseGoal(courseId, days, isGetReminderSelected); + saveWeeklyCourseGoal(courseId, days, selectReminders); } function handleSubscribeToReminders(event) { @@ -50,8 +53,24 @@ function WeeklyLearningGoalCard({ {intl.formatMessage(messages.setWeeklyGoalDetail)} -
-
+
+
-
+ +
-
+ +
+
- {/* This is supposed to fill with gray in the bottom of the card */} {isGetReminderSelected && (