From bb5a9a6ae61162785a43bc7aadea1829f6b1b9cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20Gonz=C3=A1lez?= Date: Sun, 8 Jul 2018 16:36:36 +0000 Subject: [PATCH] [IMP] mail: Add some missing aria attributes Some aria HTML attributes were missing, and are desirable to provide a better experience for screen reader users. The following attributes are included: - `aria-pressed`: Used in buttons whose function is toggled when pressed. In this case, it is added on the button to follow/unfollow a record. - `role`: used to improve given information about what elements are for. In this case, it is added in the following cases: 1. Buttons to apply filters (e.g. to filter conversations) are set to role="tab". These buttons have the class `o_filter_button`. 2. Elements who are not buttons but have the class `dropdown-menu` are set to role="button". Closes #25667 --- addons/mail/static/src/js/followers.js | 1 + addons/mail/static/src/xml/systray.xml | 16 ++++++++-------- .../mail/static/src/xml/web_kanban_activity.xml | 2 +- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/addons/mail/static/src/js/followers.js b/addons/mail/static/src/js/followers.js index de48b4108cc..d90b8cce261 100644 --- a/addons/mail/static/src/js/followers.js +++ b/addons/mail/static/src/js/followers.js @@ -93,6 +93,7 @@ var Followers = AbstractField.extend({ this.$('.o_subtypes_list > .dropdown-toggle').attr('disabled', true); this.$('.o_followers_actions .dropdown-toggle').removeClass('o_followers_following'); } + this.$('button.o_followers_follow_button').attr("aria-pressed", this.is_follower); }, _displayGeneric: function () { // only display the number of followers (e.g. if read failed) diff --git a/addons/mail/static/src/xml/systray.xml b/addons/mail/static/src/xml/systray.xml index 85bc33d58d4..49d6095d647 100644 --- a/addons/mail/static/src/xml/systray.xml +++ b/addons/mail/static/src/xml/systray.xml @@ -6,7 +6,7 @@ -->
  • -
  • -