From 6e48cd35b9b72ea07bab64c53756adfb1aafc97a Mon Sep 17 00:00:00 2001 From: Marcy Sutton Date: Wed, 3 Sep 2014 13:32:50 -0700 Subject: [PATCH] fix(material-list): Add semantics --- src/base/constants.js | 2 ++ src/components/list/list.js | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/src/base/constants.js b/src/base/constants.js index f707538919b..b0add2d0e09 100644 --- a/src/base/constants.js +++ b/src/base/constants.js @@ -3,6 +3,8 @@ var Constant = { ROLE : { BUTTON : 'button', CHECKBOX : 'checkbox', + LIST : 'list', + LIST_ITEM : 'listitem', RADIO : 'radio', RADIO_GROUP : 'radiogroup', TAB_LIST : 'tablist', diff --git a/src/components/list/list.js b/src/components/list/list.js index adae9a29836..3f303d36d9e 100644 --- a/src/components/list/list.js +++ b/src/components/list/list.js @@ -47,6 +47,9 @@ function materialListDirective() { return { restrict: 'E', link: function($scope, $element, $attr) { + $element.attr({ + 'role' : Constant.ARIA.ROLE.LIST + }); } }; } @@ -75,6 +78,9 @@ function materialItemDirective() { return { restrict: 'E', link: function($scope, $element, $attr) { + $element.attr({ + 'role' : Constant.ARIA.ROLE.LIST_ITEM + }); } }; }