Skip to content

Commit

Permalink
Fix: Feedback title/altTitle documentation and schema updates. (#166)
Browse files Browse the repository at this point in the history
* Fix: Feedback title/altTitle documentation and schema updates.

* altTitle schema description amended.
  • Loading branch information
joe-allen-89 authored Mar 24, 2023
1 parent 639b3b9 commit bcecb2c
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 @@ -94,7 +94,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 three types of answers: **correct**, **\_incorrect**, and **\_partlyCorrect**. 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 heading if no visual heading 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 @@ -47,6 +47,7 @@
],
"_feedback":{
"title": "Feedback title",
"altTitle": "Alt feedback text",
"correct": "Congratulations, this is the correct feedback.",
"_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 @@ -201,7 +201,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 bcecb2c

Please sign in to comment.