This repository was archived by the owner on Sep 5, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +5
-22
lines changed
src/components/datepicker/js Expand file tree Collapse file tree 2 files changed +5
-22
lines changed Original file line number Diff line number Diff line change 109109 '<input ' +
110110 ( ariaLabelValue ? 'aria-label="' + ariaLabelValue + '" ' : '' ) +
111111 'class="md-datepicker-input" ' +
112- 'aria-haspopup="true" ' +
113- 'aria-expanded="{{ctrl.isCalendarOpen}}" ' +
112+ 'aria-haspopup="dialog" ' +
114113 'ng-focus="ctrl.setFocused(true)" ' +
115114 'ng-blur="ctrl.setFocused(false)"> ' +
116115 triangleButton +
325324 this . isFocused = false ;
326325
327326 /** @type {boolean } */
328- this . isDisabled ;
327+ this . isDisabled = undefined ;
329328 this . setDisabled ( $element [ 0 ] . disabled || angular . isString ( $attrs . disabled ) ) ;
330329
331330 /** @type {boolean } Whether the date-picker's calendar pane is open. */
334333 /** @type {boolean } Whether the calendar should open when the input is focused. */
335334 this . openOnFocus = $attrs . hasOwnProperty ( 'mdOpenOnFocus' ) ;
336335
337- /** @final */
336+ /** @type { Object } Instance of the mdInputContainer controller */
338337 this . mdInputContainer = null ;
339338
340339 /**
648647 } ;
649648
650649 /**
651- * Check to see if the input is valid as the validation should fail if the model is invalid
650+ * Check to see if the input is valid, as the validation should fail if the model is invalid.
652651 *
653- * @param {String } inputString
652+ * @param {string } inputString
654653 * @param {Date } parsedDate
655654 * @return {boolean } Whether the input is valid
656655 */
Original file line number Diff line number Diff line change @@ -851,22 +851,6 @@ describe('md-datepicker', function() {
851851 expect ( controller . calendarPane . id ) . toBe ( ariaAttr ) ;
852852 } ) ;
853853
854- it ( 'should toggle the aria-expanded value' , function ( ) {
855- expect ( controller . ngInputElement . attr ( 'aria-expanded' ) ) . toBe ( 'false' ) ;
856-
857- controller . openCalendarPane ( {
858- target : controller . inputElement
859- } ) ;
860- scope . $apply ( ) ;
861-
862- expect ( controller . ngInputElement . attr ( 'aria-expanded' ) ) . toBe ( 'true' ) ;
863-
864- controller . closeCalendarPane ( ) ;
865- scope . $apply ( ) ;
866-
867- expect ( controller . ngInputElement . attr ( 'aria-expanded' ) ) . toBe ( 'false' ) ;
868- } ) ;
869-
870854 describe ( 'tabindex behavior' , function ( ) {
871855 beforeEach ( function ( ) {
872856 ngElement && ngElement . remove ( ) ;
You can’t perform that action at this time.
0 commit comments