@progress/kendo-angular-buttons 8.1.0 → 8.1.1-dev.202210181055

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -14,5 +14,5 @@ export interface ChipContentClickEvent {
14
14
  /**
15
15
  * The DOM event that triggered the `contentClick` event of the Chip.
16
16
  */
17
- originalEvent: MouseEvent;
17
+ originalEvent: any;
18
18
  }
@@ -15,7 +15,7 @@ export interface ChipListRemoveEvent {
15
15
  /**
16
16
  * The DOM event that triggered the `remove` event of the ChipList.
17
17
  */
18
- originalEvent: MouseEvent;
18
+ originalEvent: any;
19
19
  /**
20
20
  * The removed `ChipComponent` instance.
21
21
  */
@@ -14,6 +14,7 @@ export declare class ChipListComponent implements OnInit, AfterViewInit, AfterCo
14
14
  private renderer;
15
15
  private element;
16
16
  hostClass: boolean;
17
+ orientation: string;
17
18
  /**
18
19
  * @hidden
19
20
  */
@@ -14,5 +14,5 @@ export interface ChipRemoveEvent {
14
14
  /**
15
15
  * The DOM event that triggered the `remove` event of the Chip.
16
16
  */
17
- originalEvent: MouseEvent;
17
+ originalEvent: any;
18
18
  }
@@ -2,7 +2,7 @@
2
2
  * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
- import { EventEmitter, ElementRef, Renderer2, AfterViewInit, OnInit, NgZone } from '@angular/core';
5
+ import { EventEmitter, ElementRef, Renderer2, AfterViewInit, OnInit, NgZone, OnChanges, SimpleChanges } from '@angular/core';
6
6
  import { LocalizationService } from '@progress/kendo-angular-l10n';
7
7
  import { ChipRemoveEvent } from './chip-remove-event-args.interface';
8
8
  import { ChipContentClickEvent } from './chip-content-click-event-args.interface';
@@ -11,7 +11,7 @@ import * as i0 from "@angular/core";
11
11
  /**
12
12
  * Displays a Chip that represents an input, attribute or an action.
13
13
  */
14
- export declare class ChipComponent implements OnInit, AfterViewInit {
14
+ export declare class ChipComponent implements OnInit, AfterViewInit, OnChanges {
15
15
  element: ElementRef;
16
16
  private renderer;
17
17
  private ngZone;
@@ -116,7 +116,6 @@ export declare class ChipComponent implements OnInit, AfterViewInit {
116
116
  */
117
117
  contentClick: EventEmitter<ChipContentClickEvent>;
118
118
  tabIndex: number;
119
- get ariaChecked(): boolean;
120
119
  hostClass: boolean;
121
120
  get hasIconClass(): boolean;
122
121
  get disabledClass(): boolean;
@@ -135,6 +134,7 @@ export declare class ChipComponent implements OnInit, AfterViewInit {
135
134
  constructor(element: ElementRef, renderer: Renderer2, ngZone: NgZone, localizationService: LocalizationService);
136
135
  ngOnInit(): void;
137
136
  ngOnDestroy(): void;
137
+ ngOnChanges(changes: SimpleChanges): void;
138
138
  ngAfterViewInit(): void;
139
139
  /**
140
140
  * @hidden
@@ -171,6 +171,7 @@ export declare class ChipComponent implements OnInit, AfterViewInit {
171
171
  private verifyIconSettings;
172
172
  private handleClasses;
173
173
  private handleThemeColor;
174
+ private keyDownHandler;
174
175
  static ɵfac: i0.ɵɵFactoryDeclaration<ChipComponent, never>;
175
176
  static ɵcmp: i0.ɵɵComponentDeclaration<ChipComponent, "kendo-chip", never, { "label": "label"; "icon": "icon"; "iconClass": "iconClass"; "avatarClass": "avatarClass"; "selected": "selected"; "removable": "removable"; "removeIcon": "removeIcon"; "disabled": "disabled"; "size": "size"; "rounded": "rounded"; "fillMode": "fillMode"; "themeColor": "themeColor"; }, { "remove": "remove"; "contentClick": "contentClick"; }, never, ["*"]>;
176
177
  }
@@ -16,6 +16,7 @@ export class ChipListComponent {
16
16
  this.renderer = renderer;
17
17
  this.element = element;
18
18
  this.hostClass = true;
19
+ this.orientation = 'horizontal';
19
20
  /**
20
21
  * Sets the selection mode of the ChipList.
21
22
  *
@@ -90,7 +91,13 @@ export class ChipListComponent {
90
91
  }
91
92
  ngAfterContentInit() {
92
93
  this.chips.forEach((chip) => {
93
- this.renderer.setAttribute(chip.element.nativeElement, 'role', 'option');
94
+ const chipEl = chip.element.nativeElement;
95
+ this.renderer.setAttribute(chipEl, 'role', 'option');
96
+ if (chip.removable) {
97
+ this.renderer.setAttribute(chipEl, 'aria-keyshortcuts', 'Enter Delete');
98
+ }
99
+ this.renderer.removeAttribute(chipEl, 'aria-pressed');
100
+ this.renderer.setAttribute(chipEl, 'aria-selected', `${chip.selected}`);
94
101
  });
95
102
  }
96
103
  ngOnDestroy() {
@@ -109,12 +116,15 @@ export class ChipListComponent {
109
116
  this.clearSelection(chip);
110
117
  }
111
118
  chip.selected = !chip.selected;
119
+ const chipEl = chip.element.nativeElement;
120
+ this.renderer.setAttribute(chipEl, 'aria-selected', `${chip.selected}`);
112
121
  this.selectedChange.emit(this.selectedChips());
113
122
  }
114
123
  clearSelection(chip) {
115
124
  this.chips.forEach((c) => {
116
125
  if (chip !== c) {
117
126
  c.selected = false;
127
+ this.renderer.setAttribute(c.element.nativeElement, 'aria-selected', 'false');
118
128
  }
119
129
  });
120
130
  }
@@ -130,7 +140,7 @@ export class ChipListComponent {
130
140
  }
131
141
  }
132
142
  ChipListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ChipListComponent, deps: [{ token: i1.LocalizationService }, { token: i0.Renderer2 }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
133
- ChipListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: ChipListComponent, selector: "kendo-chiplist, kendo-chip-list", inputs: { selection: "selection", size: "size" }, outputs: { selectedChange: "selectedChange", remove: "remove" }, host: { listeners: { "click": "onClick($event)" }, properties: { "class.k-chip-list": "this.hostClass", "attr.dir": "this.direction", "class.k-selection-single": "this.single", "class.k-selection-multiple": "this.multiple", "attr.role": "this.role" } }, providers: [
143
+ ChipListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: ChipListComponent, selector: "kendo-chiplist, kendo-chip-list", inputs: { selection: "selection", size: "size" }, outputs: { selectedChange: "selectedChange", remove: "remove" }, host: { listeners: { "click": "onClick($event)" }, properties: { "class.k-chip-list": "this.hostClass", "attr.aria-orientation": "this.orientation", "attr.dir": "this.direction", "class.k-selection-single": "this.single", "attr.aria-multiselectable": "this.multiple", "class.k-selection-multiple": "this.multiple", "attr.role": "this.role" } }, providers: [
134
144
  LocalizationService,
135
145
  {
136
146
  provide: L10N_PREFIX,
@@ -157,6 +167,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
157
167
  }], ctorParameters: function () { return [{ type: i1.LocalizationService }, { type: i0.Renderer2 }, { type: i0.ElementRef }]; }, propDecorators: { hostClass: [{
158
168
  type: HostBinding,
159
169
  args: ['class.k-chip-list']
170
+ }], orientation: [{
171
+ type: HostBinding,
172
+ args: ['attr.aria-orientation']
160
173
  }], direction: [{
161
174
  type: HostBinding,
162
175
  args: ['attr.dir']
@@ -175,6 +188,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
175
188
  type: HostBinding,
176
189
  args: ['class.k-selection-single']
177
190
  }], multiple: [{
191
+ type: HostBinding,
192
+ args: ['attr.aria-multiselectable']
193
+ }, {
178
194
  type: HostBinding,
179
195
  args: ['class.k-selection-multiple']
180
196
  }], role: [{
@@ -4,7 +4,7 @@
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  import { Component, HostBinding, Input, Output, EventEmitter, isDevMode } from '@angular/core';
6
6
  import { Subscription } from 'rxjs';
7
- import { isDocumentAvailable } from '@progress/kendo-angular-common';
7
+ import { isDocumentAvailable, Keys } from '@progress/kendo-angular-common';
8
8
  import { LocalizationService, L10N_PREFIX } from '@progress/kendo-angular-l10n';
9
9
  import { validatePackage } from '@progress/kendo-licensing';
10
10
  import { packageMetadata } from '../package-metadata';
@@ -135,9 +135,6 @@ export class ChipComponent {
135
135
  get themeColor() {
136
136
  return this._themeColor;
137
137
  }
138
- get ariaChecked() {
139
- return this.selected;
140
- }
141
138
  get hasIconClass() {
142
139
  return this.icon || this.iconClass || this.avatarClass ? true : false;
143
140
  }
@@ -153,10 +150,19 @@ export class ChipComponent {
153
150
  ngOnInit() {
154
151
  this.subs.add(this.localizationService.changes
155
152
  .subscribe(({ rtl }) => this.direction = rtl ? 'rtl' : 'ltr'));
153
+ this.renderer.setAttribute(this.element.nativeElement, 'role', 'button');
156
154
  }
157
155
  ngOnDestroy() {
158
156
  this.subs.unsubscribe();
159
157
  }
158
+ ngOnChanges(changes) {
159
+ if (changes && changes['selected']) {
160
+ const hasAriaSelected = this.element.nativeElement.hasAttribute('aria-selected');
161
+ if (!hasAriaSelected) {
162
+ this.renderer.setAttribute(this.element.nativeElement, 'aria-pressed', `${this.selected}`);
163
+ }
164
+ }
165
+ }
160
166
  ngAfterViewInit() {
161
167
  const chip = this.element.nativeElement;
162
168
  const stylingOptions = ['size', 'rounded', 'fillMode'];
@@ -235,6 +241,7 @@ export class ChipComponent {
235
241
  });
236
242
  }
237
243
  }));
244
+ this.subs.add(this.renderer.listen(chip, 'keydown', this.keyDownHandler.bind(this)));
238
245
  });
239
246
  }
240
247
  /**
@@ -273,15 +280,32 @@ export class ChipComponent {
273
280
  }
274
281
  }
275
282
  }
283
+ keyDownHandler(e) {
284
+ const isEnterOrSpace = e.keyCode === Keys.Enter || e.keyCode === Keys.Space;
285
+ const isDeleteOrBackspace = e.keyCode === Keys.Delete || e.keyCode === Keys.Backspace;
286
+ if (this.disabled) {
287
+ return;
288
+ }
289
+ if (isEnterOrSpace) {
290
+ this.ngZone.run(() => {
291
+ this.contentClick.emit({ sender: this, originalEvent: e });
292
+ });
293
+ }
294
+ else if (isDeleteOrBackspace && this.removable) {
295
+ this.ngZone.run(() => {
296
+ this.remove.emit({ sender: this, originalEvent: e });
297
+ });
298
+ }
299
+ }
276
300
  }
277
301
  ChipComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ChipComponent, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.NgZone }, { token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
278
- ChipComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: ChipComponent, selector: "kendo-chip", inputs: { label: "label", icon: "icon", iconClass: "iconClass", avatarClass: "avatarClass", selected: "selected", removable: "removable", removeIcon: "removeIcon", disabled: "disabled", size: "size", rounded: "rounded", fillMode: "fillMode", themeColor: "themeColor" }, outputs: { remove: "remove", contentClick: "contentClick" }, host: { properties: { "attr.tabindex": "this.tabIndex", "attr.aria-checked": "this.ariaChecked", "class.k-chip": "this.hostClass", "class.k-chip-has-icon": "this.hasIconClass", "attr.aria-disabled": "this.disabledClass", "class.k-disabled": "this.disabledClass", "class.k-selected": "this.selectedClass", "class.k-focus": "this.focusedClass", "attr.dir": "this.direction" } }, providers: [
302
+ ChipComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: ChipComponent, selector: "kendo-chip", inputs: { label: "label", icon: "icon", iconClass: "iconClass", avatarClass: "avatarClass", selected: "selected", removable: "removable", removeIcon: "removeIcon", disabled: "disabled", size: "size", rounded: "rounded", fillMode: "fillMode", themeColor: "themeColor" }, outputs: { remove: "remove", contentClick: "contentClick" }, host: { properties: { "attr.tabindex": "this.tabIndex", "class.k-chip": "this.hostClass", "class.k-chip-has-icon": "this.hasIconClass", "attr.aria-disabled": "this.disabledClass", "class.k-disabled": "this.disabledClass", "class.k-selected": "this.selectedClass", "class.k-focus": "this.focusedClass", "attr.dir": "this.direction" } }, providers: [
279
303
  LocalizationService,
280
304
  {
281
305
  provide: L10N_PREFIX,
282
306
  useValue: 'kendo.chip'
283
307
  }
284
- ], ngImport: i0, template: `
308
+ ], usesOnChanges: true, ngImport: i0, template: `
285
309
  <span
286
310
  *ngIf="icon"
287
311
  class="k-chip-icon k-icon"
@@ -408,9 +432,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
408
432
  }], tabIndex: [{
409
433
  type: HostBinding,
410
434
  args: ['attr.tabindex']
411
- }], ariaChecked: [{
412
- type: HostBinding,
413
- args: ['attr.aria-checked']
414
435
  }], hostClass: [{
415
436
  type: HostBinding,
416
437
  args: ['class.k-chip']
@@ -127,6 +127,10 @@ export class FloatingActionButtonComponent {
127
127
  * @hidden
128
128
  */
129
129
  this.id = `k-${guid()}`;
130
+ /**
131
+ * @hidden
132
+ */
133
+ this.dialListId = `k-dial-list-${guid()}`;
130
134
  this._themeColor = DEFAULT_THEME_COLOR;
131
135
  this._size = DEFAULT_SIZE;
132
136
  this._rounded = DEFAULT_ROUNDED;
@@ -313,20 +317,20 @@ export class FloatingActionButtonComponent {
313
317
  /**
314
318
  * @hidden
315
319
  */
316
- get role() {
317
- return (this.dialItems && this.dialItems.length) ? 'menubutton' : 'button';
320
+ get ariaExpanded() {
321
+ return this.hasDialItems ? this.isOpen : null;
318
322
  }
319
323
  /**
320
324
  * @hidden
321
325
  */
322
- get ariaExpanded() {
323
- return isPresent(this.isOpen);
326
+ get ariaHasPopup() {
327
+ return this.hasDialItems ? 'menu' : null;
324
328
  }
325
329
  /**
326
330
  * @hidden
327
331
  */
328
- get ariaHasPopup() {
329
- return isPresent(this.isOpen);
332
+ get ariaControls() {
333
+ return this.hasDialItems ? this.dialListId : null;
330
334
  }
331
335
  /**
332
336
  * @hidden
@@ -381,6 +385,15 @@ export class FloatingActionButtonComponent {
381
385
  action !== NavigationAction.Tab) {
382
386
  event.preventDefault();
383
387
  }
388
+ if (action === NavigationAction.EnterUp && !this.hasDialItems) {
389
+ this.button.nativeElement.click();
390
+ }
391
+ else if (action === NavigationAction.Open || action === NavigationAction.Close) {
392
+ const toggleDial = action === NavigationAction.Open;
393
+ this.ngZone.run(() => {
394
+ this.toggleDialWithEvents(toggleDial);
395
+ });
396
+ }
384
397
  }
385
398
  /**
386
399
  * @hidden
@@ -542,6 +555,7 @@ export class FloatingActionButtonComponent {
542
555
  if (this.dialItemAnimation && this.isValidAnimation()) {
543
556
  this.playAnimation(true);
544
557
  }
558
+ this.renderer.setAttribute(this.button.nativeElement, 'aria-expanded', 'true');
545
559
  }
546
560
  closeDial() {
547
561
  if (this.dialItemAnimation && this.isValidAnimation()) {
@@ -551,6 +565,7 @@ export class FloatingActionButtonComponent {
551
565
  else {
552
566
  this.closePopup();
553
567
  }
568
+ this.renderer.setAttribute(this.button.nativeElement, 'aria-expanded', 'false');
554
569
  }
555
570
  isValidAnimation() {
556
571
  const animation = this.dialItemAnimation;
@@ -563,6 +578,9 @@ export class FloatingActionButtonComponent {
563
578
  if (this.dialItemTemplate) {
564
579
  return;
565
580
  }
581
+ if (!this.popupRef) {
582
+ return;
583
+ }
566
584
  const fab = this.element.nativeElement;
567
585
  const fabWidth = fab.getBoundingClientRect().width;
568
586
  const popupEl = this.popupRef.popupElement;
@@ -682,7 +700,6 @@ FloatingActionButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "1
682
700
  <button
683
701
  #button
684
702
  [attr.id]="id"
685
- [attr.role]="role"
686
703
  [tabIndex]="componentTabIndex"
687
704
  type="button"
688
705
  class="k-fab k-fab-solid"
@@ -692,6 +709,7 @@ FloatingActionButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "1
692
709
  [attr.aria-disabled]="disabled"
693
710
  [attr.aria-expanded]="ariaExpanded"
694
711
  [attr.aria-haspopup]="ariaHasPopup"
712
+ [attr.aria-controls]="ariaControls"
695
713
  (focus)="focusHandler()"
696
714
  (blur)="blurHandler()"
697
715
  [kendoEventsOutsideAngular]="{
@@ -714,6 +732,8 @@ FloatingActionButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "1
714
732
  <ng-template #popupTemplate>
715
733
  <ul
716
734
  kendoDialList
735
+ role="menu"
736
+ [id]="dialListId"
717
737
  [ngClass]="dialClass"
718
738
  [dialItems]="dialItems"
719
739
  [dialItemTemplate]='dialItemTemplate?.templateRef'
@@ -742,7 +762,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
742
762
  <button
743
763
  #button
744
764
  [attr.id]="id"
745
- [attr.role]="role"
746
765
  [tabIndex]="componentTabIndex"
747
766
  type="button"
748
767
  class="k-fab k-fab-solid"
@@ -752,6 +771,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
752
771
  [attr.aria-disabled]="disabled"
753
772
  [attr.aria-expanded]="ariaExpanded"
754
773
  [attr.aria-haspopup]="ariaHasPopup"
774
+ [attr.aria-controls]="ariaControls"
755
775
  (focus)="focusHandler()"
756
776
  (blur)="blurHandler()"
757
777
  [kendoEventsOutsideAngular]="{
@@ -774,6 +794,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
774
794
  <ng-template #popupTemplate>
775
795
  <ul
776
796
  kendoDialList
797
+ role="menu"
798
+ [id]="dialListId"
777
799
  [ngClass]="dialClass"
778
800
  [dialItems]="dialItems"
779
801
  [dialItemTemplate]='dialItemTemplate?.templateRef'
@@ -9,7 +9,7 @@ export const packageMetadata = {
9
9
  name: '@progress/kendo-angular-buttons',
10
10
  productName: 'Kendo UI for Angular',
11
11
  productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
12
- publishDate: 1662712402,
12
+ publishDate: 1666090512,
13
13
  version: '',
14
14
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning'
15
15
  };
@@ -26,7 +26,7 @@ const packageMetadata = {
26
26
  name: '@progress/kendo-angular-buttons',
27
27
  productName: 'Kendo UI for Angular',
28
28
  productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
29
- publishDate: 1662712402,
29
+ publishDate: 1666090512,
30
30
  version: '',
31
31
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning'
32
32
  };
@@ -3397,9 +3397,6 @@ class ChipComponent {
3397
3397
  get themeColor() {
3398
3398
  return this._themeColor;
3399
3399
  }
3400
- get ariaChecked() {
3401
- return this.selected;
3402
- }
3403
3400
  get hasIconClass() {
3404
3401
  return this.icon || this.iconClass || this.avatarClass ? true : false;
3405
3402
  }
@@ -3415,10 +3412,19 @@ class ChipComponent {
3415
3412
  ngOnInit() {
3416
3413
  this.subs.add(this.localizationService.changes
3417
3414
  .subscribe(({ rtl }) => this.direction = rtl ? 'rtl' : 'ltr'));
3415
+ this.renderer.setAttribute(this.element.nativeElement, 'role', 'button');
3418
3416
  }
3419
3417
  ngOnDestroy() {
3420
3418
  this.subs.unsubscribe();
3421
3419
  }
3420
+ ngOnChanges(changes) {
3421
+ if (changes && changes['selected']) {
3422
+ const hasAriaSelected = this.element.nativeElement.hasAttribute('aria-selected');
3423
+ if (!hasAriaSelected) {
3424
+ this.renderer.setAttribute(this.element.nativeElement, 'aria-pressed', `${this.selected}`);
3425
+ }
3426
+ }
3427
+ }
3422
3428
  ngAfterViewInit() {
3423
3429
  const chip = this.element.nativeElement;
3424
3430
  const stylingOptions = ['size', 'rounded', 'fillMode'];
@@ -3497,6 +3503,7 @@ class ChipComponent {
3497
3503
  });
3498
3504
  }
3499
3505
  }));
3506
+ this.subs.add(this.renderer.listen(chip, 'keydown', this.keyDownHandler.bind(this)));
3500
3507
  });
3501
3508
  }
3502
3509
  /**
@@ -3535,15 +3542,32 @@ class ChipComponent {
3535
3542
  }
3536
3543
  }
3537
3544
  }
3545
+ keyDownHandler(e) {
3546
+ const isEnterOrSpace = e.keyCode === Keys.Enter || e.keyCode === Keys.Space;
3547
+ const isDeleteOrBackspace = e.keyCode === Keys.Delete || e.keyCode === Keys.Backspace;
3548
+ if (this.disabled) {
3549
+ return;
3550
+ }
3551
+ if (isEnterOrSpace) {
3552
+ this.ngZone.run(() => {
3553
+ this.contentClick.emit({ sender: this, originalEvent: e });
3554
+ });
3555
+ }
3556
+ else if (isDeleteOrBackspace && this.removable) {
3557
+ this.ngZone.run(() => {
3558
+ this.remove.emit({ sender: this, originalEvent: e });
3559
+ });
3560
+ }
3561
+ }
3538
3562
  }
3539
3563
  ChipComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ChipComponent, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.NgZone }, { token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
3540
- ChipComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: ChipComponent, selector: "kendo-chip", inputs: { label: "label", icon: "icon", iconClass: "iconClass", avatarClass: "avatarClass", selected: "selected", removable: "removable", removeIcon: "removeIcon", disabled: "disabled", size: "size", rounded: "rounded", fillMode: "fillMode", themeColor: "themeColor" }, outputs: { remove: "remove", contentClick: "contentClick" }, host: { properties: { "attr.tabindex": "this.tabIndex", "attr.aria-checked": "this.ariaChecked", "class.k-chip": "this.hostClass", "class.k-chip-has-icon": "this.hasIconClass", "attr.aria-disabled": "this.disabledClass", "class.k-disabled": "this.disabledClass", "class.k-selected": "this.selectedClass", "class.k-focus": "this.focusedClass", "attr.dir": "this.direction" } }, providers: [
3564
+ ChipComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: ChipComponent, selector: "kendo-chip", inputs: { label: "label", icon: "icon", iconClass: "iconClass", avatarClass: "avatarClass", selected: "selected", removable: "removable", removeIcon: "removeIcon", disabled: "disabled", size: "size", rounded: "rounded", fillMode: "fillMode", themeColor: "themeColor" }, outputs: { remove: "remove", contentClick: "contentClick" }, host: { properties: { "attr.tabindex": "this.tabIndex", "class.k-chip": "this.hostClass", "class.k-chip-has-icon": "this.hasIconClass", "attr.aria-disabled": "this.disabledClass", "class.k-disabled": "this.disabledClass", "class.k-selected": "this.selectedClass", "class.k-focus": "this.focusedClass", "attr.dir": "this.direction" } }, providers: [
3541
3565
  LocalizationService,
3542
3566
  {
3543
3567
  provide: L10N_PREFIX,
3544
3568
  useValue: 'kendo.chip'
3545
3569
  }
3546
- ], ngImport: i0, template: `
3570
+ ], usesOnChanges: true, ngImport: i0, template: `
3547
3571
  <span
3548
3572
  *ngIf="icon"
3549
3573
  class="k-chip-icon k-icon"
@@ -3670,9 +3694,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
3670
3694
  }], tabIndex: [{
3671
3695
  type: HostBinding,
3672
3696
  args: ['attr.tabindex']
3673
- }], ariaChecked: [{
3674
- type: HostBinding,
3675
- args: ['attr.aria-checked']
3676
3697
  }], hostClass: [{
3677
3698
  type: HostBinding,
3678
3699
  args: ['class.k-chip']
@@ -3702,6 +3723,7 @@ class ChipListComponent {
3702
3723
  this.renderer = renderer;
3703
3724
  this.element = element;
3704
3725
  this.hostClass = true;
3726
+ this.orientation = 'horizontal';
3705
3727
  /**
3706
3728
  * Sets the selection mode of the ChipList.
3707
3729
  *
@@ -3776,7 +3798,13 @@ class ChipListComponent {
3776
3798
  }
3777
3799
  ngAfterContentInit() {
3778
3800
  this.chips.forEach((chip) => {
3779
- this.renderer.setAttribute(chip.element.nativeElement, 'role', 'option');
3801
+ const chipEl = chip.element.nativeElement;
3802
+ this.renderer.setAttribute(chipEl, 'role', 'option');
3803
+ if (chip.removable) {
3804
+ this.renderer.setAttribute(chipEl, 'aria-keyshortcuts', 'Enter Delete');
3805
+ }
3806
+ this.renderer.removeAttribute(chipEl, 'aria-pressed');
3807
+ this.renderer.setAttribute(chipEl, 'aria-selected', `${chip.selected}`);
3780
3808
  });
3781
3809
  }
3782
3810
  ngOnDestroy() {
@@ -3795,12 +3823,15 @@ class ChipListComponent {
3795
3823
  this.clearSelection(chip);
3796
3824
  }
3797
3825
  chip.selected = !chip.selected;
3826
+ const chipEl = chip.element.nativeElement;
3827
+ this.renderer.setAttribute(chipEl, 'aria-selected', `${chip.selected}`);
3798
3828
  this.selectedChange.emit(this.selectedChips());
3799
3829
  }
3800
3830
  clearSelection(chip) {
3801
3831
  this.chips.forEach((c) => {
3802
3832
  if (chip !== c) {
3803
3833
  c.selected = false;
3834
+ this.renderer.setAttribute(c.element.nativeElement, 'aria-selected', 'false');
3804
3835
  }
3805
3836
  });
3806
3837
  }
@@ -3816,7 +3847,7 @@ class ChipListComponent {
3816
3847
  }
3817
3848
  }
3818
3849
  ChipListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ChipListComponent, deps: [{ token: i1.LocalizationService }, { token: i0.Renderer2 }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
3819
- ChipListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: ChipListComponent, selector: "kendo-chiplist, kendo-chip-list", inputs: { selection: "selection", size: "size" }, outputs: { selectedChange: "selectedChange", remove: "remove" }, host: { listeners: { "click": "onClick($event)" }, properties: { "class.k-chip-list": "this.hostClass", "attr.dir": "this.direction", "class.k-selection-single": "this.single", "class.k-selection-multiple": "this.multiple", "attr.role": "this.role" } }, providers: [
3850
+ ChipListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: ChipListComponent, selector: "kendo-chiplist, kendo-chip-list", inputs: { selection: "selection", size: "size" }, outputs: { selectedChange: "selectedChange", remove: "remove" }, host: { listeners: { "click": "onClick($event)" }, properties: { "class.k-chip-list": "this.hostClass", "attr.aria-orientation": "this.orientation", "attr.dir": "this.direction", "class.k-selection-single": "this.single", "attr.aria-multiselectable": "this.multiple", "class.k-selection-multiple": "this.multiple", "attr.role": "this.role" } }, providers: [
3820
3851
  LocalizationService,
3821
3852
  {
3822
3853
  provide: L10N_PREFIX,
@@ -3843,6 +3874,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
3843
3874
  }], ctorParameters: function () { return [{ type: i1.LocalizationService }, { type: i0.Renderer2 }, { type: i0.ElementRef }]; }, propDecorators: { hostClass: [{
3844
3875
  type: HostBinding,
3845
3876
  args: ['class.k-chip-list']
3877
+ }], orientation: [{
3878
+ type: HostBinding,
3879
+ args: ['attr.aria-orientation']
3846
3880
  }], direction: [{
3847
3881
  type: HostBinding,
3848
3882
  args: ['attr.dir']
@@ -3861,6 +3895,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
3861
3895
  type: HostBinding,
3862
3896
  args: ['class.k-selection-single']
3863
3897
  }], multiple: [{
3898
+ type: HostBinding,
3899
+ args: ['attr.aria-multiselectable']
3900
+ }, {
3864
3901
  type: HostBinding,
3865
3902
  args: ['class.k-selection-multiple']
3866
3903
  }], role: [{
@@ -4329,6 +4366,10 @@ class FloatingActionButtonComponent {
4329
4366
  * @hidden
4330
4367
  */
4331
4368
  this.id = `k-${guid()}`;
4369
+ /**
4370
+ * @hidden
4371
+ */
4372
+ this.dialListId = `k-dial-list-${guid()}`;
4332
4373
  this._themeColor = DEFAULT_THEME_COLOR;
4333
4374
  this._size = DEFAULT_SIZE;
4334
4375
  this._rounded = DEFAULT_ROUNDED;
@@ -4515,20 +4556,20 @@ class FloatingActionButtonComponent {
4515
4556
  /**
4516
4557
  * @hidden
4517
4558
  */
4518
- get role() {
4519
- return (this.dialItems && this.dialItems.length) ? 'menubutton' : 'button';
4559
+ get ariaExpanded() {
4560
+ return this.hasDialItems ? this.isOpen : null;
4520
4561
  }
4521
4562
  /**
4522
4563
  * @hidden
4523
4564
  */
4524
- get ariaExpanded() {
4525
- return isPresent(this.isOpen);
4565
+ get ariaHasPopup() {
4566
+ return this.hasDialItems ? 'menu' : null;
4526
4567
  }
4527
4568
  /**
4528
4569
  * @hidden
4529
4570
  */
4530
- get ariaHasPopup() {
4531
- return isPresent(this.isOpen);
4571
+ get ariaControls() {
4572
+ return this.hasDialItems ? this.dialListId : null;
4532
4573
  }
4533
4574
  /**
4534
4575
  * @hidden
@@ -4583,6 +4624,15 @@ class FloatingActionButtonComponent {
4583
4624
  action !== NavigationAction.Tab) {
4584
4625
  event.preventDefault();
4585
4626
  }
4627
+ if (action === NavigationAction.EnterUp && !this.hasDialItems) {
4628
+ this.button.nativeElement.click();
4629
+ }
4630
+ else if (action === NavigationAction.Open || action === NavigationAction.Close) {
4631
+ const toggleDial = action === NavigationAction.Open;
4632
+ this.ngZone.run(() => {
4633
+ this.toggleDialWithEvents(toggleDial);
4634
+ });
4635
+ }
4586
4636
  }
4587
4637
  /**
4588
4638
  * @hidden
@@ -4744,6 +4794,7 @@ class FloatingActionButtonComponent {
4744
4794
  if (this.dialItemAnimation && this.isValidAnimation()) {
4745
4795
  this.playAnimation(true);
4746
4796
  }
4797
+ this.renderer.setAttribute(this.button.nativeElement, 'aria-expanded', 'true');
4747
4798
  }
4748
4799
  closeDial() {
4749
4800
  if (this.dialItemAnimation && this.isValidAnimation()) {
@@ -4753,6 +4804,7 @@ class FloatingActionButtonComponent {
4753
4804
  else {
4754
4805
  this.closePopup();
4755
4806
  }
4807
+ this.renderer.setAttribute(this.button.nativeElement, 'aria-expanded', 'false');
4756
4808
  }
4757
4809
  isValidAnimation() {
4758
4810
  const animation = this.dialItemAnimation;
@@ -4765,6 +4817,9 @@ class FloatingActionButtonComponent {
4765
4817
  if (this.dialItemTemplate) {
4766
4818
  return;
4767
4819
  }
4820
+ if (!this.popupRef) {
4821
+ return;
4822
+ }
4768
4823
  const fab = this.element.nativeElement;
4769
4824
  const fabWidth = fab.getBoundingClientRect().width;
4770
4825
  const popupEl = this.popupRef.popupElement;
@@ -4884,7 +4939,6 @@ FloatingActionButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "1
4884
4939
  <button
4885
4940
  #button
4886
4941
  [attr.id]="id"
4887
- [attr.role]="role"
4888
4942
  [tabIndex]="componentTabIndex"
4889
4943
  type="button"
4890
4944
  class="k-fab k-fab-solid"
@@ -4894,6 +4948,7 @@ FloatingActionButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "1
4894
4948
  [attr.aria-disabled]="disabled"
4895
4949
  [attr.aria-expanded]="ariaExpanded"
4896
4950
  [attr.aria-haspopup]="ariaHasPopup"
4951
+ [attr.aria-controls]="ariaControls"
4897
4952
  (focus)="focusHandler()"
4898
4953
  (blur)="blurHandler()"
4899
4954
  [kendoEventsOutsideAngular]="{
@@ -4916,6 +4971,8 @@ FloatingActionButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "1
4916
4971
  <ng-template #popupTemplate>
4917
4972
  <ul
4918
4973
  kendoDialList
4974
+ role="menu"
4975
+ [id]="dialListId"
4919
4976
  [ngClass]="dialClass"
4920
4977
  [dialItems]="dialItems"
4921
4978
  [dialItemTemplate]='dialItemTemplate?.templateRef'
@@ -4944,7 +5001,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
4944
5001
  <button
4945
5002
  #button
4946
5003
  [attr.id]="id"
4947
- [attr.role]="role"
4948
5004
  [tabIndex]="componentTabIndex"
4949
5005
  type="button"
4950
5006
  class="k-fab k-fab-solid"
@@ -4954,6 +5010,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
4954
5010
  [attr.aria-disabled]="disabled"
4955
5011
  [attr.aria-expanded]="ariaExpanded"
4956
5012
  [attr.aria-haspopup]="ariaHasPopup"
5013
+ [attr.aria-controls]="ariaControls"
4957
5014
  (focus)="focusHandler()"
4958
5015
  (blur)="blurHandler()"
4959
5016
  [kendoEventsOutsideAngular]="{
@@ -4976,6 +5033,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
4976
5033
  <ng-template #popupTemplate>
4977
5034
  <ul
4978
5035
  kendoDialList
5036
+ role="menu"
5037
+ [id]="dialListId"
4979
5038
  [ngClass]="dialClass"
4980
5039
  [dialItems]="dialItems"
4981
5040
  [dialItemTemplate]='dialItemTemplate?.templateRef'