Skip to content

Commit

Permalink
Fix: Feedback title/altTitle documentation and schema updates (adaptl…
Browse files Browse the repository at this point in the history
  • Loading branch information
joe-allen-89 authored Mar 21, 2023
1 parent 9b655ad commit 5ec2413
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,9 @@ guide the learner’s interaction with the component.
**\_feedback** (object): If the [**Tutor** extension](https://github.com/adaptlearning/adapt-contrib-tutor) is enabled, these various texts will be displayed depending on the submitted answer. **\_feedback**
contains values for two types of answers: **correct** and **\_incorrect**. Some attributes are optional. If they are not supplied, the default that is noted below will be used.

>**title** (string): If not set, the component's **displayTitle** is used as the feedback title. If **displayTitle** is not set , **title** will be used instead.
>**title** (string): Title text for the feedback that will be displayed when the question is submitted.
>**altTitle** (string): This will be read out by screen readers as an alternative title if no visual title is included.
>**correct** (string): Text that will be displayed when the submitted answer is correct.
Expand Down
1 change: 1 addition & 0 deletions example.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
"_showScaleNumbers": true,
"_feedback": {
"title": "Feedback",
"altTitle": "Alt feedback title text",
"correct": "This feedback will appear if you answered the question correctly.",
"_incorrect": {
"notFinal": "",
Expand Down
11 changes: 10 additions & 1 deletion schema/component.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,16 @@
"title": {
"type": "string",
"title": "Title",
"description": "Leave blank to have the component's title shown instead",
"description": "Title text for the feedback",
"default": "",
"_adapt": {
"translatable": true
}
},
"altTitle": {
"type": "string",
"title": "Alternative Feedback Title",
"description": "Text read out by screen readers if no visual title is included",
"default": "",
"_adapt": {
"translatable": true
Expand Down

0 comments on commit 5ec2413

Please sign in to comment.