Skip to content

Commit 9248949

Browse files
committed
Calendar: Remove unneeded row and gridcell role attributes
1 parent 1b885ff commit 9248949

File tree

2 files changed

+2
-9
lines changed

2 files changed

+2
-9
lines changed

tests/unit/calendar/core.js

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ QUnit.test( "mouse", function( assert ) {
401401
} );
402402

403403
QUnit.test( "ARIA", function( assert ) {
404-
assert.expect( 15 );
404+
assert.expect( 12 );
405405

406406
var id = this.element.attr( "id" ),
407407
headerId = id + "-title",
@@ -426,17 +426,11 @@ QUnit.test( "ARIA", function( assert ) {
426426

427427
assert.equal( table.children( "thead" ).attr( "role" ), "presentation",
428428
"Table head role attribute" );
429-
assert.equal( table.find( "thead tr" ).attr( "role" ), "row",
430-
"Table head row role attribute" );
431429
assert.equal( table.find( "thead th" ).first().attr( "role" ), "columnheader",
432430
"Table head cell role attribute" );
433431

434432
assert.equal( table.children( "tbody" ).attr( "role" ), "presentation",
435433
"Table body role attribute" );
436-
assert.equal( table.find( "tbody tr" ).attr( "role" ), "row",
437-
"Table body row role attribute" );
438-
assert.equal( table.find( "tbody td" ).first().attr( "role" ), "gridcell",
439-
"Table body cell role attribute" );
440434
assert.equal( table.find( "tbody td" ).first().attr( "aria-describedby" ),
441435
monthLabelId, "Table body cell ARIA describedby attribute" );
442436
} );

ui/widgets/calendar.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,7 @@ return $.widget( "ui.calendar", {
408408
_buildGridHeading: function() {
409409
var head = $( "<thead role='presentation'>" ),
410410
week = $( "<th>" ),
411-
row = $( "<tr role='row'>" ),
411+
row = $( "<tr>" ),
412412
i = 0,
413413
weekDayLength = this._getViewDate().weekdays().length,
414414
weekdays = this._getViewDate().weekdays();
@@ -463,7 +463,6 @@ return $.widget( "ui.calendar", {
463463
dateObject = new Date( day.timestamp ),
464464
dayName = this._calendarDateOptions.formatWeekdayFull( dateObject ),
465465
attributes = [
466-
"role='gridcell'",
467466
"aria-selected='" + ( this._isCurrent( day ) ? true : false ) + "'",
468467
"aria-label='" + dayName + ", " + this._format( dateObject ) + "'",
469468
"aria-describedby='" + this._getGridId() + "-month-label'"

0 commit comments

Comments
 (0)