You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Questionnaire\Accessibility\Slider: The slider values should be associated with the labels and the slider should be programmatically associated with the question (#495)
* Questionnaire: More meaningful error than nopermissions (#488)
Co-authored-by: Emanoil Manoylov <[email protected]>
* Questionnaire\Accessibility\Slider: The slider values should be associated with the labels #674064
---------
Co-authored-by: emanoylov <[email protected]>
Co-authored-by: Emanoil Manoylov <[email protected]>
Co-authored-by: tai.letan <[email protected]>
Copy file name to clipboardExpand all lines: lang/en/questionnaire.php
+10Lines changed: 10 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -275,6 +275,8 @@
275
275
$string['lastrespondent'] = 'Last Respondent';
276
276
$string['length'] = 'Length';
277
277
$string['leftlabel'] = 'Left label';
278
+
$string['leftpart'] = '{$a->min} is {$a->leftlabel}';
279
+
$string['leftpartdefault'] = '{$a->min} is minimum slider range';
278
280
$string['managequestions'] = 'Manage questions';
279
281
$string['managequestions_help'] = 'In the Manage questions section of the Edit Questions page, you can conduct a number of operations on a Questionnaire\'s questions.';
$string['minforcedresponses_help'] = 'Use these parameters to force respondent to tick a minimum of **Min.** boxes and a maximum of **Max.** check boxes. To
299
305
force an exact number of check boxes to be ticked, set **Min.** and **Max.** to the same value. If only a min or a max value is desired, just leave the other
@@ -559,6 +565,8 @@
559
565
$string['resumesurvey'] = 'Resume questionnaire';
560
566
$string['return'] = 'Return';
561
567
$string['rightlabel'] = 'Right label';
568
+
$string['rightpart'] = ' and {$a->max} is {$a->rightlabel}';
569
+
$string['rightpartdefault'] = ' and {$a->max} is maximum slider range';
Copy file name to clipboardExpand all lines: tests/behat/slider_question.feature
+41Lines changed: 41 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -85,3 +85,44 @@ Feature: Slider questions can add slider with range for users to choose
85
85
| Sliderstartingvalue | 10 |
86
86
| Sliderincrementvalue | 15 |
87
87
And I should see "This question type supports an absolute maximum range of -100 to +100. We expect the vast majority of questionnaire designs to use a range of 1-10 or -10 to +10."
88
+
89
+
@javascript
90
+
Scenario: Test accessibility for slider question type.
91
+
Given I log in as "teacher1"
92
+
And I am on "Course 1" course homepage
93
+
And I am on the "Test questionnaire""questionnaire activity" page
94
+
And I navigate to "Questions" in current page administration
95
+
And I add a "Slider" question and I fill the form with:
96
+
| QuestionName | Q2 |
97
+
| QuestionText | Sliderquestiontestnormalcase |
98
+
| Leftlabel | Left |
99
+
| Rightlabel | Right |
100
+
| Centrelabel | Center |
101
+
| Minimumsliderrange (left) | 1 |
102
+
| Maximumsliderrange (right) | 9 |
103
+
| Sliderstartingvalue | 5 |
104
+
| Sliderincrementvalue | 1 |
105
+
And I add a "Slider" question and I fill the form with:
And I add a "Slider" question and I fill the form with:
114
+
| QuestionName | Q4 |
115
+
| QuestionText | Sliderquestiontestnolabel |
116
+
| Minimumsliderrange (left) | 1 |
117
+
| Maximumsliderrange (right) | 9 |
118
+
| Sliderstartingvalue | 1 |
119
+
| Sliderincrementvalue | 1 |
120
+
And I navigate to "Preview" in current page administration
121
+
Then "//legend[@class='accesshide' and contains(text(), 'Question #1')]""xpath_element" should exist
122
+
Then "//output[@class='bubble' and contains(text(), '5')]/h2[contains(text(), 'where 5 is Left, 50 and 55 are Center and 100 is Right')]""xpath_element" should exist
123
+
Then "//legend[@class='accesshide' and contains(text(), 'Question #2')]""xpath_element" should exist
124
+
Then "//output[@class='bubble' and contains(text(), '5')]/h2[contains(text(), 'where 1 is Left, 5 is Center and 9 is Right')]""xpath_element" should exist
125
+
Then "//legend[@class='accesshide' and contains(text(), 'Question #3')]""xpath_element" should exist
126
+
Then "//output[@class='bubble' and contains(text(), '1')]/h2[contains(text(), 'where -5 is Left, 0 is average and 5 is maximum slider range')]""xpath_element" should exist
127
+
Then "//legend[@class='accesshide' and contains(text(), 'Question #4')]""xpath_element" should exist
128
+
Then "//output[@class='bubble' and contains(text(), '1')]/h2[contains(text(), 'where 1 is minimum slider range, 5 is average and 9 is maximum slider range')]""xpath_element" should exist
0 commit comments