Skip to content
This repository has been archived by the owner on Nov 3, 2021. It is now read-only.

Commit

Permalink
Merge pull request #24863 from jobara/1069380
Browse files Browse the repository at this point in the history
Bug 1069380 - Use link role instead of button for open action in cards view
  • Loading branch information
yzen committed Oct 9, 2014
2 parents eb23ec5 + 04c378b commit 1d3e427
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
5 changes: 2 additions & 3 deletions apps/system/js/card.js
Expand Up @@ -71,7 +71,7 @@
*/
Card.prototype._template =
'<div class="screenshotView bb-button" data-l10n-id="openCard" ' +
' role="button"></div>' +
' role="link"></div>' +
'<div class="appIconView" style="background-image:{iconValue}"></div>' +
'' +
'<div class="titles">' +
Expand All @@ -81,7 +81,7 @@
'' +
'<footer class="card-tray">'+
' <button class="appIcon" data-l10n-id="openCard" ' +
' data-button-action="select"></button>' +
' data-button-action="select" aria-hidden="true"></button>' +
' <menu class="buttonbar">' +
' <button class="close-button bb-button" data-l10n-id="closeCard" ' +
' data-button-action="close" role="button" ' +
Expand Down Expand Up @@ -335,4 +335,3 @@
return (exports.Card = Card);

})(window);

7 changes: 7 additions & 0 deletions apps/system/test/unit/card_test.js
Expand Up @@ -83,6 +83,13 @@ suite('system/Card', function() {
assert.ok(header.id, 'h1.id');
});

test('has expected aria values', function(){
var card = this.card;

assert.equal(card.screenshotView.getAttribute('role'), 'link');
assert.strictEqual(card.iconButton.getAttribute('aria-hidden'), 'true');
});

test('adds browser class for browser windows', function(){
var app = makeApp({ name: 'browserwindow' });
this.sinon.stub(app, 'isBrowser', function() {
Expand Down

0 comments on commit 1d3e427

Please sign in to comment.