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 109
109
'<input ' +
110
110
( ariaLabelValue ? 'aria-label="' + ariaLabelValue + '" ' : '' ) +
111
111
'class="md-datepicker-input" ' +
112
- 'aria-haspopup="true" ' +
113
- 'aria-expanded="{{ctrl.isCalendarOpen}}" ' +
112
+ 'aria-haspopup="dialog" ' +
114
113
'ng-focus="ctrl.setFocused(true)" ' +
115
114
'ng-blur="ctrl.setFocused(false)"> ' +
116
115
triangleButton +
325
324
this . isFocused = false ;
326
325
327
326
/** @type {boolean } */
328
- this . isDisabled ;
327
+ this . isDisabled = undefined ;
329
328
this . setDisabled ( $element [ 0 ] . disabled || angular . isString ( $attrs . disabled ) ) ;
330
329
331
330
/** @type {boolean } Whether the date-picker's calendar pane is open. */
334
333
/** @type {boolean } Whether the calendar should open when the input is focused. */
335
334
this . openOnFocus = $attrs . hasOwnProperty ( 'mdOpenOnFocus' ) ;
336
335
337
- /** @final */
336
+ /** @type { Object } Instance of the mdInputContainer controller */
338
337
this . mdInputContainer = null ;
339
338
340
339
/**
648
647
} ;
649
648
650
649
/**
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.
652
651
*
653
- * @param {String } inputString
652
+ * @param {string } inputString
654
653
* @param {Date } parsedDate
655
654
* @return {boolean } Whether the input is valid
656
655
*/
Original file line number Diff line number Diff line change @@ -851,22 +851,6 @@ describe('md-datepicker', function() {
851
851
expect ( controller . calendarPane . id ) . toBe ( ariaAttr ) ;
852
852
} ) ;
853
853
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
-
870
854
describe ( 'tabindex behavior' , function ( ) {
871
855
beforeEach ( function ( ) {
872
856
ngElement && ngElement . remove ( ) ;
You can’t perform that action at this time.
0 commit comments