From 30fb910d932d5b9bdcad4dbfb4175f891dc328f6 Mon Sep 17 00:00:00 2001 From: Marcy Sutton Date: Thu, 30 Oct 2014 17:09:19 -0700 Subject: [PATCH] fix(md-button): Improve a11y --- docs/config/template/index.template.html | 2 +- src/components/button/button.js | 6 +++--- src/components/button/button.spec.js | 13 ++++++++++++- src/components/button/demoBasicUsage/index.html | 2 +- 4 files changed, 17 insertions(+), 6 deletions(-) diff --git a/docs/config/template/index.template.html b/docs/config/template/index.template.html index b06498c40eb..85a99b99382 100644 --- a/docs/config/template/index.template.html +++ b/docs/config/template/index.template.html @@ -72,7 +72,7 @@

ng-if="path().indexOf('demo') > -1"> + ng-href="#{{doc.url}}" aria-label="{{ doc | humanizeDoc }}"> diff --git a/src/components/button/button.js b/src/components/button/button.js index 42a9cb0d81c..6ab304c95da 100644 --- a/src/components/button/button.js +++ b/src/components/button/button.js @@ -64,11 +64,11 @@ function MdButtonDirective(ngHrefDirectives, $mdInkRipple, $mdAria, $mdUtil, $md // so this element can be clicked like a normal ``. if (attr.ngHref || attr.href) { innerElement = angular.element(''); - attributesToCopy = ['ng-href', 'href', 'rel', 'target']; + attributesToCopy = ['ng-href', 'href', 'rel', 'target', 'title', 'aria-label']; // Otherwise, just add an inner button element (for form submission etc) } else { innerElement = angular.element('