fix: [AA-1078] weekly learning goals a11y nav (#711)

- Add radio role and aria-checked to button to enable screen reader use
This commit is contained in:
Chris Deery
2021-10-27 16:55:41 -04:00
committed by GitHub
parent d1013802ba
commit 4abf6ebdce
2 changed files with 2 additions and 7 deletions

View File

@@ -14,9 +14,8 @@ function FlagButton({
type="button"
className={classnames('flag-button m-1.5 pt-3 pb-md-3 pb-xl-0',
isSelected ? 'flag-button-selected' : '')}
// aria-checked={isSelected}
// role="radio"
// tabIndex={isSelected ? '0' : '-1'}
aria-checked={isSelected}
role="radio"
onClick={() => handleSelect()}
data-testid={`weekly-learning-goal-input-${title}`}
>

View File

@@ -64,10 +64,6 @@ function WeeklyLearningGoalCard({
</Card.Text>
<div
className="flag-button-container m-0 p-0"
// making this work as a radio button for keyboard nav
// is not working
// role="radiogroup"
// aria-labelledby="learning_goal_choices_label"
>
<LearningGoalButton
level="casual"