Skip to content

Commit 6a5091a

Browse files
committed
fix(datepicker): remove aira-expanded on datepicker input since the
attribute is not supported for text inputs. also only set aria-owns attribute when the datepicker is open and therefore actually in the DOM.
1 parent a34787d commit 6a5091a

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/lib/datepicker/datepicker-input.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,8 @@ export const MD_DATEPICKER_VALIDATORS: any = {
5757
selector: 'input[mdDatepicker], input[matDatepicker]',
5858
providers: [MD_DATEPICKER_VALUE_ACCESSOR, MD_DATEPICKER_VALIDATORS],
5959
host: {
60-
'[attr.aria-expanded]': '_datepicker?.opened || "false"',
6160
'[attr.aria-haspopup]': 'true',
62-
'[attr.aria-owns]': '_datepicker?.id',
61+
'[attr.aria-owns]': '_datepicker?.opened && _datepicker.id',
6362
'[attr.min]': 'min ? _dateAdapter.getISODateString(min) : null',
6463
'[attr.max]': 'max ? _dateAdapter.getISODateString(max) : null',
6564
'[disabled]': 'disabled',

0 commit comments

Comments
 (0)