Skip to content

Commit

Permalink
updated ids, added lang term
Browse files Browse the repository at this point in the history
  • Loading branch information
rileyodonnelld2l committed Dec 19, 2024
1 parent 86cc887 commit a40a5f4
Show file tree
Hide file tree
Showing 51 changed files with 252 additions and 48 deletions.
15 changes: 9 additions & 6 deletions js/questionset.js
Original file line number Diff line number Diff line change
Expand Up @@ -302,12 +302,15 @@ H5P.QuestionSet = function (options, contentId, contentData) {
((params.introPage.showIntroPage && params.noOfQuestionAnswered === 0) ? 'hidden' : ''),
});

const tabIDs = Array.from({length: params.questions.length}, () => H5P.createUUID());
const tabPanelIDs = Array.from({length: params.questions.length}, () => H5P.createUUID());

for (let i=0; i<params.questions.length; i++) {
$('<div>', {
class: 'question-container',
role: 'tabpanel',
id: 'qs-panel-' + (i + 1),
'aria-labelledby': 'qs-tab-' + (i + 1),
id: tabPanelIDs[i],
'aria-labelledby': tabIDs[i],
appendTo: self.$questionsContainer
});
}
Expand Down Expand Up @@ -338,8 +341,8 @@ H5P.QuestionSet = function (options, contentId, contentData) {
html: '<a href="#" class= "progress-dot unanswered ' +
(params.disableBackwardsNavigation ? 'disabled' : '') +
'" ' +
'id="qs-tab-' +
(i + 1) +
'id="' +
tabIDs[i] +
'" ' +
'aria-label=' +
'"' +
Expand All @@ -349,8 +352,8 @@ H5P.QuestionSet = function (options, contentId, contentData) {
'" ' +
'tabindex="-1" ' +
(params.disableBackwardsNavigation ? 'aria-disabled="true"' : '') +
' aria-controls="qs-panel-' +
(i + 1) +
' aria-controls="' +
tabPanelIDs[i] +
'" ' +
'aria-selected="false" ' +
'role="tab"></a>',
Expand Down
6 changes: 5 additions & 1 deletion language/.en.json
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,10 @@
{
"label": "Navigation label for readspeakers",
"default": "Questions"
},
{
"label": "Instruction for navigating question set with screenreader",
"default": "Choose question to display"
}
]
},
Expand Down Expand Up @@ -275,4 +279,4 @@
]
}
]
}
}
6 changes: 5 additions & 1 deletion language/af.json
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,10 @@
{
"label": "Navigation label for readspeakers",
"default": "Questions"
},
{
"label": "Instruction for navigating question set with screenreader",
"default": "Choose question to display"
}
]
},
Expand Down Expand Up @@ -275,4 +279,4 @@
]
}
]
}
}
4 changes: 4 additions & 0 deletions language/ar.json
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,10 @@
{
"label": "Navigation label for readspeakers",
"default": "Questions"
},
{
"label": "Instruction for navigating question set with screenreader",
"default": "Choose question to display"
}
]
},
Expand Down
6 changes: 5 additions & 1 deletion language/bg.json
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,10 @@
{
"label": "Navigation label for readspeakers",
"default": "Questions"
},
{
"label": "Instruction for navigating question set with screenreader",
"default": "Choose question to display"
}
]
},
Expand Down Expand Up @@ -275,4 +279,4 @@
]
}
]
}
}
6 changes: 5 additions & 1 deletion language/bs.json
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,10 @@
{
"label": "Navigation label for readspeakers",
"default": "Questions"
},
{
"label": "Instruction for navigating question set with screenreader",
"default": "Choose question to display"
}
]
},
Expand Down Expand Up @@ -275,4 +279,4 @@
]
}
]
}
}
6 changes: 5 additions & 1 deletion language/ca.json
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,10 @@
{
"label": "Navigation label for readspeakers",
"default": "Questions"
},
{
"label": "Instruction for navigating question set with screenreader",
"default": "Choose question to display"
}
]
},
Expand Down Expand Up @@ -275,4 +279,4 @@
]
}
]
}
}
4 changes: 4 additions & 0 deletions language/cs.json
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,10 @@
{
"label": "Navigační popisek pro čtecí zařízení",
"default": "Otázky"
},
{
"label": "Instruction for navigating question set with screenreader",
"default": "Choose question to display"
}
]
},
Expand Down
4 changes: 4 additions & 0 deletions language/da.json
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,10 @@
{
"label": "Navigation label for readspeakers",
"default": "Spørgsmål"
},
{
"label": "Instruction for navigating question set with screenreader",
"default": "Choose question to display"
}
]
},
Expand Down
4 changes: 4 additions & 0 deletions language/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,10 @@
{
"label": "Beschriftung für Vorlesewerkzeuge",
"default": "Fragen"
},
{
"label": "Instruction for navigating question set with screenreader",
"default": "Choose question to display"
}
]
},
Expand Down
4 changes: 4 additions & 0 deletions language/el.json
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,10 @@
{
"label": "Ετικέτα πλοήγησης για αναγνώστες",
"default": "Ερωτήσεις"
},
{
"label": "Instruction for navigating question set with screenreader",
"default": "Choose question to display"
}
]
},
Expand Down
4 changes: 4 additions & 0 deletions language/es-mx.json
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,10 @@
{
"label": "Etiqueta de navegación para lectores de pantalla",
"default": "Preguntas"
},
{
"label": "Instruction for navigating question set with screenreader",
"default": "Choose question to display"
}
]
},
Expand Down
4 changes: 4 additions & 0 deletions language/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,10 @@
{
"label": "Etiqueta de navegación para lectores de pantalla",
"default": "Preguntas"
},
{
"label": "Instruction for navigating question set with screenreader",
"default": "Choose question to display"
}
]
},
Expand Down
6 changes: 5 additions & 1 deletion language/et.json
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,10 @@
{
"label": "Navigation label for readspeakers",
"default": "Questions"
},
{
"label": "Instruction for navigating question set with screenreader",
"default": "Choose question to display"
}
]
},
Expand Down Expand Up @@ -275,4 +279,4 @@
]
}
]
}
}
4 changes: 4 additions & 0 deletions language/eu.json
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,10 @@
{
"label": "Irakurgailuentzako nabigazio etiketa",
"default": "Galderak"
},
{
"label": "Instruction for navigating question set with screenreader",
"default": "Choose question to display"
}
]
},
Expand Down
6 changes: 5 additions & 1 deletion language/fa.json
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,10 @@
{
"label": "Navigation label for readspeakers",
"default": "Questions"
},
{
"label": "Instruction for navigating question set with screenreader",
"default": "Choose question to display"
}
]
},
Expand Down Expand Up @@ -275,4 +279,4 @@
]
}
]
}
}
6 changes: 5 additions & 1 deletion language/fi.json
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,10 @@
{
"label": "Navigation label for readspeakers",
"default": "Questions"
},
{
"label": "Instruction for navigating question set with screenreader",
"default": "Choose question to display"
}
]
},
Expand Down Expand Up @@ -275,4 +279,4 @@
]
}
]
}
}
5 changes: 4 additions & 1 deletion language/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,10 @@
{
"label": "Texte de navigation pour la synthèse vocale",
"default": "Questions"
},
{
"label": "Instruction for navigating question set with screenreader",
"default": "Choose question to display"
}
]
},
Expand Down Expand Up @@ -151,7 +155,6 @@
"description": "Ce titre sera affiché à la fin du quiz quand l'utilisateur aura répondu à toutes les questions."
},
{

"label": "Score announcer",
"description": "Cette vignette sera utilisée pour annoncer la note finale à l'utilisateur sur l'écran de fin",
"default": "Vous avez obtenu @finals sur @totals points"
Expand Down
6 changes: 5 additions & 1 deletion language/ga.json
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,10 @@
{
"label": "Navigation label for readspeakers",
"default": "Questions"
},
{
"label": "Instruction for navigating question set with screenreader",
"default": "Choose question to display"
}
]
},
Expand Down Expand Up @@ -275,4 +279,4 @@
]
}
]
}
}
4 changes: 4 additions & 0 deletions language/gl.json
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,10 @@
{
"label": "Etiqueta de navegación para lectores de pantalla",
"default": "Preguntas"
},
{
"label": "Instruction for navigating question set with screenreader",
"default": "Choose question to display"
}
]
},
Expand Down
4 changes: 4 additions & 0 deletions language/he.json
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,10 @@
{
"label": "תווית ניווט להקראה",
"default": "שאלות"
},
{
"label": "Instruction for navigating question set with screenreader",
"default": "Choose question to display"
}
]
},
Expand Down
6 changes: 5 additions & 1 deletion language/hu.json
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,10 @@
{
"label": "Navigation label for readspeakers",
"default": "Questions"
},
{
"label": "Instruction for navigating question set with screenreader",
"default": "Choose question to display"
}
]
},
Expand Down Expand Up @@ -275,4 +279,4 @@
]
}
]
}
}
6 changes: 5 additions & 1 deletion language/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,10 @@
{
"label": "Navigation label for readspeakers",
"default": "Questions"
},
{
"label": "Instruction for navigating question set with screenreader",
"default": "Choose question to display"
}
]
},
Expand Down Expand Up @@ -275,4 +279,4 @@
]
}
]
}
}
6 changes: 5 additions & 1 deletion language/ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,10 @@
{
"label": "Navigation label for readspeakers",
"default": "Questions"
},
{
"label": "Instruction for navigating question set with screenreader",
"default": "Choose question to display"
}
]
},
Expand Down Expand Up @@ -275,4 +279,4 @@
]
}
]
}
}
Loading

0 comments on commit a40a5f4

Please sign in to comment.