From 65166d7ddd5e9fe4e934c5e03fd9bf1ff19d84f2 Mon Sep 17 00:00:00 2001 From: Eric Rowell Date: Sat, 2 Nov 2013 22:39:24 -0700 Subject: [PATCH] added role=presentation to content node --- src/Stage.js | 1 + test/unit/Stage-test.js | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Stage.js b/src/Stage.js index 8223144a..4793686b 100644 --- a/src/Stage.js +++ b/src/Stage.js @@ -615,6 +615,7 @@ this.content.style.position = RELATIVE; this.content.style.display = INLINE_BLOCK; this.content.className = KINETICJS_CONTENT; + this.content.setAttribute('role', 'presentation'); container.appendChild(this.content); // the buffer canvas pixel ratio must be 1 because it is used as an diff --git a/test/unit/Stage-test.js b/test/unit/Stage-test.js index ca97ac9e..3591a7c5 100644 --- a/test/unit/Stage-test.js +++ b/test/unit/Stage-test.js @@ -1,7 +1,7 @@ suite('Stage', function() { // ====================================================== - test('instantiate stage with id', function() { + test.only('instantiate stage with id', function() { var container = document.createElement('div'); container.id = 'container'; @@ -12,6 +12,11 @@ suite('Stage', function() { width: 578, height: 200 }); + + assert.equal(stage.getContent().className, 'kineticjs-content'); + assert.equal(stage.getContent().getAttribute('role'), 'presentation'); + + }); // ======================================================