Skip to content

Commit

Permalink
MDL-56431 messaging: Added aria label to filter.
Browse files Browse the repository at this point in the history
Added an aria label to the course filter in the
messaging page.
  • Loading branch information
abgreeve committed Nov 24, 2016
1 parent c5c8f3a commit 72a5842
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions lang/en/message.php
Expand Up @@ -97,6 +97,7 @@
$string['permitted'] = 'Permitted';
$string['processorsettings'] = 'Processor settings';
$string['removecontact'] = 'Remove contact';
$string['removecoursefilter'] = 'Remove filter for course {$a}';
$string['removefromyourcontacts'] = 'Remove from your contacts';
$string['requiresconfiguration'] = 'Requires configuration';
$string['searchforuser'] = 'Search for a user';
Expand Down
2 changes: 1 addition & 1 deletion message/amd/build/message_area_search.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions message/amd/src/message_area_search.js
Expand Up @@ -383,6 +383,9 @@ define(['jquery', 'core/ajax', 'core/templates', 'core/notification', 'core/str'
this.messageArea.find(SELECTORS.CONTACTSAREA).addClass('searchfilter');
this.messageArea.find(SELECTORS.SEARCHFILTERAREA).show();
this.messageArea.find(SELECTORS.SEARCHFILTER).html(text);
Str.get_string('removecoursefilter', 'message', text).then(function(languagestring) {
this.messageArea.find(SELECTORS.SEARCHFILTERAREA).attr('aria-label', languagestring);
}.bind(this));
};

/**
Expand All @@ -394,6 +397,7 @@ define(['jquery', 'core/ajax', 'core/templates', 'core/notification', 'core/str'
this.messageArea.find(SELECTORS.CONTACTSAREA).removeClass('searchfilter');
this.messageArea.find(SELECTORS.SEARCHFILTER).empty();
this.messageArea.find(SELECTORS.SEARCHFILTERAREA).hide();
this.messageArea.find(SELECTORS.SEARCHFILTERAREA).removeAttr('aria-label');
};

/**
Expand Down
1 change: 1 addition & 0 deletions message/templates/message_area_response.mustache
Expand Up @@ -19,6 +19,7 @@
rows="1"
data-auto-rows
data-max-rows="5"
role="textbox"
aria-label="{{#str}} writeamessage, message {{/str}}"
placeholder="{{#str}} writeamessage, message {{/str}}"></textarea>
</div>
Expand Down

0 comments on commit 72a5842

Please sign in to comment.