Skip to content

Conversation

@moloko
Copy link
Contributor

@moloko moloko commented Mar 3, 2021

part of #2942

Note: will also require updates to all the core question components, these will follow shortly Now done - except for textInput

I'll also try and add a demo build so that anyone wanting to actually test this out can do so done, see this comment

@moloko moloko requested a review from oliverfoster March 3, 2021 18:41
@moloko
Copy link
Contributor Author

moloko commented Mar 4, 2021

should also resolve #2961

@moloko
Copy link
Contributor Author

moloko commented Mar 4, 2021

Sample course:
correct-answer-a11y.zip

Notes:

  • doesn't yet include support for textInput. I'll sort this out at some point.
  • everything should be backwardly-compatible i.e. the framework version should work with older versions of question components, though obviously the ARIA live region won't actually update if the learner clicks the correct answer button.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👀

@moloko moloko requested a review from tomgreenfield March 4, 2021 19:03
Copy link
Contributor

@tomgreenfield tomgreenfield left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👁️

} else {
ariaAnswer = globals.ariaCorrectAnswers;
const correctOptions = this.getChildren().where({ _shouldBeSelected: true });
correctAnswer = correctOptions.map(correctOption => correctOption.get('text')).join('<br>');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As discussed, could always pass through the correct answers as an array, giving flexibility to the plugin globals:

The correct answers are {​{​#each correctAnswer}​}​{​{​{​this}​}​}​{​{​#unless @last}​}​<br>{{/unless}}{​{​/each}​}​

Don't know if it will ever be tweaked in practice.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a nice suggestion but as you say, whether it will ever get used in practice is questionable.... can easily be changed in future if it does come up as a requirement.

@moloko moloko merged commit 812fe01 into master Mar 12, 2021
@moloko moloko deleted the issue/2942 branch March 12, 2021 15:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Jaws cursor placement after submit in questions that _canShowFeedback: false & _canShowModelAnswer: true

6 participants