chip.ts (material2-7.3.6) | : | chip.ts (material2-7.3.7) | ||
---|---|---|---|---|
skipping to change at line 146 | skipping to change at line 146 | |||
get rippleDisabled(): boolean { | get rippleDisabled(): boolean { | |||
return this.disabled || this.disableRipple || !!this.rippleConfig.disabled; | return this.disabled || this.disableRipple || !!this.rippleConfig.disabled; | |||
} | } | |||
/** Whether the chip has focus. */ | /** Whether the chip has focus. */ | |||
_hasFocus: boolean = false; | _hasFocus: boolean = false; | |||
/** Whether the chip list is selectable */ | /** Whether the chip list is selectable */ | |||
chipListSelectable: boolean = true; | chipListSelectable: boolean = true; | |||
/** Whether the chip list is in multi-selection mode. */ | ||||
_chipListMultiple: boolean = false; | ||||
/** The chip avatar */ | /** The chip avatar */ | |||
@ContentChild(MatChipAvatar) avatar: MatChipAvatar; | @ContentChild(MatChipAvatar) avatar: MatChipAvatar; | |||
/** The chip's trailing icon. */ | /** The chip's trailing icon. */ | |||
@ContentChild(MatChipTrailingIcon) trailingIcon: MatChipTrailingIcon; | @ContentChild(MatChipTrailingIcon) trailingIcon: MatChipTrailingIcon; | |||
/** The chip's remove toggler. */ | /** The chip's remove toggler. */ | |||
@ContentChild(forwardRef(() => MatChipRemove)) removeIcon: MatChipRemove; | @ContentChild(forwardRef(() => MatChipRemove)) removeIcon: MatChipRemove; | |||
/** Whether the chip is selected. */ | /** Whether the chip is selected. */ | |||
skipping to change at line 219 | skipping to change at line 222 | |||
new EventEmitter<MatChipSelectionChange>(); | new EventEmitter<MatChipSelectionChange>(); | |||
/** Emitted when the chip is destroyed. */ | /** Emitted when the chip is destroyed. */ | |||
@Output() readonly destroyed: EventEmitter<MatChipEvent> = new EventEmitter<Ma tChipEvent>(); | @Output() readonly destroyed: EventEmitter<MatChipEvent> = new EventEmitter<Ma tChipEvent>(); | |||
/** Emitted when a chip is to be removed. */ | /** Emitted when a chip is to be removed. */ | |||
@Output() readonly removed: EventEmitter<MatChipEvent> = new EventEmitter<MatC hipEvent>(); | @Output() readonly removed: EventEmitter<MatChipEvent> = new EventEmitter<MatC hipEvent>(); | |||
/** The ARIA selected applied to the chip. */ | /** The ARIA selected applied to the chip. */ | |||
get ariaSelected(): string | null { | get ariaSelected(): string | null { | |||
return this.selectable ? this.selected.toString() : null; | // Remove the `aria-selected` when the chip is deselected in single-selectio | |||
n mode, because | ||||
// it adds noise to NVDA users where "not selected" will be read out for eac | ||||
h chip. | ||||
return this.selectable && (this._chipListMultiple || this.selected) ? | ||||
this.selected.toString() : null; | ||||
} | } | |||
constructor(public _elementRef: ElementRef, | constructor(public _elementRef: ElementRef, | |||
private _ngZone: NgZone, | private _ngZone: NgZone, | |||
platform: Platform, | platform: Platform, | |||
@Optional() @Inject(MAT_RIPPLE_GLOBAL_OPTIONS) | @Optional() @Inject(MAT_RIPPLE_GLOBAL_OPTIONS) | |||
globalRippleOptions: RippleGlobalOptions | null) { | globalRippleOptions: RippleGlobalOptions | null) { | |||
super(_elementRef); | super(_elementRef); | |||
this._addHostClassName(); | this._addHostClassName(); | |||
End of changes. 2 change blocks. | ||||
1 lines changed or deleted | 9 lines changed or added |