Skip to content

Commit

Permalink
Merge 3111cf1 into ab7ed98
Browse files Browse the repository at this point in the history
  • Loading branch information
samiheikki committed Oct 28, 2018
2 parents ab7ed98 + 3111cf1 commit c71dc7f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/vaadin-month-calendar.html
Expand Up @@ -329,7 +329,7 @@
}

_getRole(date) {
return date ? 'button' : 'presentational';
return date ? 'button' : 'presentation';
}

_getAriaLabel(date) {
Expand Down
9 changes: 9 additions & 0 deletions test/wai-aria.html
Expand Up @@ -291,6 +291,15 @@
});
});

it('should have presentation roles on empty date cells', () => {
var emptyDateElements = monthCalendar.root.querySelectorAll('[part="date"]:empty');

Array.prototype.forEach.call(emptyDateElements, emptyElement => {
expect(emptyElement.getAttribute('role')).to.equal('presentation');
expect(emptyElement.getAttribute('aria-label')).to.be.empty;
});
});

describe('week numbers', () => {
beforeEach(done => {
monthCalendar.showWeekNumbers = true;
Expand Down

0 comments on commit c71dc7f

Please sign in to comment.