From 56e91aff5a21b9615b7a8c7b2d594b68227b36c8 Mon Sep 17 00:00:00 2001 From: Aurora Virmasalo Date: Tue, 3 Sep 2024 10:18:57 +0300 Subject: [PATCH] Fix examination question hide button accessibility --- .../exam-participation.component.html | 4 +-- .../sections/section-question.component.html | 12 ++----- .../examination-question.component.html | 33 +++++++++++-------- .../examination-question.component.ts | 5 +++ 4 files changed, 29 insertions(+), 25 deletions(-) diff --git a/ui/src/app/enrolment/finished/exam-participation.component.html b/ui/src/app/enrolment/finished/exam-participation.component.html index 362716eb8..c988c0bc5 100644 --- a/ui/src/app/enrolment/finished/exam-participation.component.html +++ b/ui/src/app/enrolment/finished/exam-participation.component.html @@ -66,8 +66,8 @@

> {{ 'i18n_comments_open' | translate }} {{ 'i18n_comments_hide' | translate }} - - + + diff --git a/ui/src/app/exam/editor/sections/section-question.component.html b/ui/src/app/exam/editor/sections/section-question.component.html index 60dc44838..60f16f72e 100644 --- a/ui/src/app/exam/editor/sections/section-question.component.html +++ b/ui/src/app/exam/editor/sections/section-question.component.html @@ -77,16 +77,8 @@ > {{ 'i18n_show_more' | translate }} {{ 'i18n_hide' | translate }} - - + + } diff --git a/ui/src/app/examination/question/examination-question.component.html b/ui/src/app/examination/question/examination-question.component.html index 8a968a5d1..1fdb5372b 100644 --- a/ui/src/app/examination/question/examination-question.component.html +++ b/ui/src/app/examination/question/examination-question.component.html @@ -14,8 +14,27 @@ } + +
+ +
-
+
@if (sq.question.type !== 'ClozeTestQuestion') { @if (expanded) {
@@ -32,18 +51,6 @@
}
- -
-
- -
-
@if (sq.answerInstructions && expanded) { diff --git a/ui/src/app/examination/question/examination-question.component.ts b/ui/src/app/examination/question/examination-question.component.ts index 17d4c0938..2ea6a15ae 100644 --- a/ui/src/app/examination/question/examination-question.component.ts +++ b/ui/src/app/examination/question/examination-question.component.ts @@ -71,6 +71,11 @@ export class ExaminationQuestionComponent implements OnInit, AfterViewInit { const { answer } = this.sq.clozeTestAnswer; this.clozeAnswer = JSON.parse(answer); } + this.questionTitle = this.removeParagraphTags(this.sq.question.question); + } + + removeParagraphTags(input: string): string { + return input.replace(/<\/?p>/g, ''); } ngAfterViewInit() {