Skip to content

Commit

Permalink
MDL-78885 gradereport_singleview: Behat updates after a11y fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Chocolate-lightning committed Sep 11, 2023
1 parent b0a20e5 commit 2ed7c33
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 16 deletions.
1 change: 1 addition & 0 deletions grade/report/singleview/renderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ public function users_selector(object $course, ?int $userid = null, ?int $groupi
'name' => 'userid',
'courseid' => $course->id,
'groupid' => $groupid ?? 0,
'instance' => rand(),
];

// If a particular user option is selected (not in zero state).
Expand Down
4 changes: 2 additions & 2 deletions grade/report/singleview/tests/behat/singleview.feature
Original file line number Diff line number Diff line change
Expand Up @@ -150,9 +150,9 @@ Feature: We can use Single view
Given I click on user menu "Grainne Beauchamp"
And I choose "Single view for this user" in the open action menu
Then I should see "Gronya,Beecham"
And I follow "Nee,Chumlee"
And I click on "Nee,Chumlee" "link" in the ".report-navigation" "css_element"
Then I should see "Nee,Chumlee"
And I follow "Gronya,Beecham"
And I click on "Gronya,Beecham" "link" in the ".report-navigation" "css_element"
Then I should see "Gronya,Beecham"
And I open the action menu in "Test assignment four" "table_row"
And I choose "Show all grades" in the open action menu
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@
{{/additionalattributes}}
{{/ core/search_input_auto }}
<input type="hidden" name="search" id="input-{{uniqid}}"/>
<div role="listbox" id="listbox-{{uniqid}}" class="searchresultscontainer" data-region="search-results-container-widget"></div>
<div role="listbox" id="listbox-{{uniqid}}" class="searchresultscontainer" data-region="search-results-container-widget" aria-label="{{#cleanstr}} aria:dropdowncolumns, gradereport_grader {{/cleanstr}}" aria-busy="true"></div>
2 changes: 1 addition & 1 deletion grade/templates/searchwidget/user/usersearch_body.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,5 @@
<input type="hidden" name="search" id="input-{{uniqid}}"/>
<div role="listbox" id="listbox-{{uniqid}}" class="searchresultscontainer" data-region="search-results-container-widget"></div>
{{#displayunsearchablecontent}}
<div class="unsearchablecontentcontainer" data-region="unsearchable-content-container-widget"></div>
<div class="unsearchablecontentcontainer" data-region="unsearchable-content-container-widget" aria-label="{{#cleanstr}} aria:dropdowncolumns, gradereport_grader {{/cleanstr}}" aria-busy="true"></div>
{{/displayunsearchablecontent}}
24 changes: 12 additions & 12 deletions grade/templates/user_selector.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -44,17 +44,17 @@
}}
<div class="search-widget dropdown d-flex" data-searchtype="user">
<div
tabindex="0"
aria-expanded="false"
role="combobox"
aria-haspopup="dialog"
aria-controls="dialog-{{uniqid}}"
data-toggle="dropdown"
class="btn dropdown-toggle d-flex text-left align-items-center p-0"
data-courseid="{{courseid}}"
data-groupid="{{groupid}}"
aria-label="{{#cleanstr}} selectauser, core_grades {{/cleanstr}}"
data-input-element="input-{{uniqid}}"
tabindex="0"
data-toggle="dropdown"
aria-expanded="false"
role="combobox"
aria-haspopup="dialog"
aria-controls="dialog-{{instance}}-{{uniqid}}"
class="btn dropdown-toggle d-flex text-left align-items-center p-0"
data-courseid="{{courseid}}"
data-groupid="{{groupid}}"
aria-label="{{#cleanstr}} selectauser, core_grades {{/cleanstr}}"
data-input-element="input-{{uniqid}}"
>
<div class="align-items-center d-flex">
{{#selectedoption}}
Expand Down Expand Up @@ -87,7 +87,7 @@
{{/selectedoption}}
</div>
</div>
<div class="dropdown-menu wide" id="dialog-{{uniqid}}" role="dialog" aria-modal="true" aria-label="{{#cleanstr}} selectauser, core_grades {{/cleanstr}}">
<div class="dropdown-menu wide" id="dialog-{{instance}}-{{uniqid}}" role="dialog" aria-modal="true" aria-label="{{#cleanstr}} selectauser, core_grades {{/cleanstr}}">
</div>
<input type="hidden" name="{{name}}" value="{{userid}}" id="input-{{uniqid}}" />
</div>

0 comments on commit 2ed7c33

Please sign in to comment.