Skip to content

Commit

Permalink
use tabindex -1. closes #679
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelcobain committed Mar 20, 2017
1 parent e6cb989 commit c63ded6
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
1 change: 1 addition & 0 deletions addon/templates/components/paper-menu.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
onFocus=(action "handleFocus")
renderInPlace=(readonly renderInPlace)
vPosition=(readonly vPosition)
tabindex=-1
)
content=(component "paper-menu-content"
dropdown=(readonly publicAPI)
Expand Down
22 changes: 22 additions & 0 deletions tests/integration/components/paper-menu-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -195,4 +195,26 @@ test('keydown changes focused element', function(assert) {
});
});
});
});

test('md-menu doesn\'t have a tabindex attribute', function(assert) {
this.render(hbs`
{{#paper-menu as |menu|}}
{{#menu.trigger}}
{{#paper-button iconButton=true}}
{{paper-icon "local_phone"}}
{{/paper-button}}
{{/menu.trigger}}
{{#menu.content width=4 as |content|}}
{{#content.menu-item onClick="openSomething"}}
<span id="menu-item">Test</span>
{{/content.menu-item}}
{{#content.menu-item onClick="openSomething"}}
<span id="menu-item2">Test 2</span>
{{/content.menu-item}}
{{/menu.content}}
{{/paper-menu}}
`);

assert.equal(this.$('md-menu').attr('tabindex'), '-1', 'no tabindex present');
});

0 comments on commit c63ded6

Please sign in to comment.