Skip to content

Commit 931cb89

Browse files
committed
Calendar: Remove unneeded aria attributes from day cell
1 parent 9248949 commit 931cb89

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

tests/unit/calendar/core.js

Lines changed: 1 addition & 3 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( 12 );
404+
assert.expect( 11 );
405405

406406
var id = this.element.attr( "id" ),
407407
headerId = id + "-title",
@@ -431,8 +431,6 @@ QUnit.test( "ARIA", function( assert ) {
431431

432432
assert.equal( table.children( "tbody" ).attr( "role" ), "presentation",
433433
"Table body role attribute" );
434-
assert.equal( table.find( "tbody td" ).first().attr( "aria-describedby" ),
435-
monthLabelId, "Table body cell ARIA describedby attribute" );
436434
} );
437435

438436
} );

ui/widgets/calendar.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -461,11 +461,8 @@ return $.widget( "ui.calendar", {
461461
_buildDayCell: function( day ) {
462462
var content = "",
463463
dateObject = new Date( day.timestamp ),
464-
dayName = this._calendarDateOptions.formatWeekdayFull( dateObject ),
465464
attributes = [
466-
"aria-selected='" + ( this._isCurrent( day ) ? true : false ) + "'",
467-
"aria-label='" + dayName + ", " + this._format( dateObject ) + "'",
468-
"aria-describedby='" + this._getGridId() + "-month-label'"
465+
"aria-selected='" + ( this._isCurrent( day ) ? true : false ) + "'"
469466
],
470467
selectable = ( day.selectable && this._isValid( dateObject ) );
471468

0 commit comments

Comments
 (0)