@fundamental-ngx/core 0.64.2-rc.0 → 0.64.2-rc.2

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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "core-schematics",
3
- "version": "0.64.2-rc.0",
3
+ "version": "0.64.2-rc.2",
4
4
  "types": "./ng-add/index.d.ts",
5
5
  "main": "./ng-add/index.js",
6
6
  "type": "commonjs"
@@ -1,5 +1,5 @@
1
1
  import * as _angular_core from '@angular/core';
2
- import { ElementRef, InjectionToken } from '@angular/core';
2
+ import { ElementRef, OnInit, InjectionToken } from '@angular/core';
3
3
  import { BooleanInput } from '@angular/cdk/coercion';
4
4
  import { HasElementRef } from '@fundamental-ngx/cdk/utils';
5
5
  import { IconFont } from '@fundamental-ngx/core/icon';
@@ -103,6 +103,20 @@ declare class BaseButton implements HasElementRef, ButtonModel {
103
103
  * auto-generate a description from their type if not provided.
104
104
  */
105
105
  readonly ariaDescription: _angular_core.InputSignal<string | null | undefined>;
106
+ /**
107
+ * Override the default type description for special button types.
108
+ * Provides a custom description for screen readers.
109
+ * If not provided, defaults to the i18n-translated type description.
110
+ */
111
+ readonly ariaTypeDescription: _angular_core.InputSignal<string | null | undefined>;
112
+ /**
113
+ * Custom aria-describedby value.
114
+ * When provided, bypasses the component's auto-generated aria-describedby
115
+ * (which references the hidden description spans) and uses this value directly.
116
+ * Use this when you need to reference external elements as the description source.
117
+ * Native aria-describedby attributes are captured automatically via ngOnInit.
118
+ */
119
+ readonly ariaDescribedBy: _angular_core.InputSignal<string | null | undefined>;
106
120
  /** @hidden */
107
121
  readonly elementRef: ElementRef<any>;
108
122
  /**
@@ -231,7 +245,7 @@ declare class BaseButton implements HasElementRef, ButtonModel {
231
245
  */
232
246
  isToggled(): boolean;
233
247
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<BaseButton, never>;
234
- static ɵdir: _angular_core.ɵɵDirectiveDeclaration<BaseButton, never, never, { "toggled": { "alias": "toggled"; "required": false; "isSignal": true; }; "selected": { "alias": "selected"; "required": false; "isSignal": true; }; "type": { "alias": "type"; "required": false; "isSignal": true; }; "glyphPosition": { "alias": "glyphPosition"; "required": false; "isSignal": true; }; "glyph": { "alias": "glyph"; "required": false; "isSignal": true; }; "glyphFont": { "alias": "glyphFont"; "required": false; "isSignal": true; }; "fdType": { "alias": "fdType"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "fdMenu": { "alias": "fdMenu"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "ariaDisabled": { "alias": "aria-disabled"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "ariaDescription": { "alias": "ariaDescription"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
248
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<BaseButton, never, never, { "toggled": { "alias": "toggled"; "required": false; "isSignal": true; }; "selected": { "alias": "selected"; "required": false; "isSignal": true; }; "type": { "alias": "type"; "required": false; "isSignal": true; }; "glyphPosition": { "alias": "glyphPosition"; "required": false; "isSignal": true; }; "glyph": { "alias": "glyph"; "required": false; "isSignal": true; }; "glyphFont": { "alias": "glyphFont"; "required": false; "isSignal": true; }; "fdType": { "alias": "fdType"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "fdMenu": { "alias": "fdMenu"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "ariaDisabled": { "alias": "aria-disabled"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "ariaDescription": { "alias": "ariaDescription"; "required": false; "isSignal": true; }; "ariaTypeDescription": { "alias": "ariaTypeDescription"; "required": false; "isSignal": true; }; "ariaDescribedBy": { "alias": "ariaDescribedBy"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
235
249
  }
236
250
 
237
251
  declare const badgeEnabledButtonTypes: ButtonType[];
@@ -285,7 +299,7 @@ declare class ButtonBadgeDirective implements HasElementRef {
285
299
  * <a fd-button label="Button Text"></a>
286
300
  * ```
287
301
  */
288
- declare class ButtonComponent extends BaseButton implements HasElementRef {
302
+ declare class ButtonComponent extends BaseButton implements HasElementRef, OnInit {
289
303
  /** Button ID - default value is provided if not set */
290
304
  readonly id: _angular_core.InputSignal<string>;
291
305
  /** @hidden */
@@ -293,15 +307,41 @@ declare class ButtonComponent extends BaseButton implements HasElementRef {
293
307
  /** @hidden */
294
308
  protected readonly contentDensityObserver: ContentDensityObserver;
295
309
  /**
296
- * Calculate aria-label attribute
310
+ * Check if button has a special type (emphasized, positive, negative, attention)
297
311
  * @hidden
298
312
  */
299
- protected readonly buttonArialabel: _angular_core.Signal<string | null | undefined>;
313
+ protected readonly isSpecialButtonType: _angular_core.Signal<boolean>;
300
314
  /**
301
- * Calculate aria-description attribute
315
+ * Calculate aria-describedby attribute value.
316
+ * If the user explicitly provides aria-describedby (via input or native attribute),
317
+ * that value is used as-is. Otherwise, auto-generates IDs referencing hidden description spans.
318
+ * Returns null if no descriptions apply (attribute not set).
302
319
  * @hidden
303
320
  */
304
- protected readonly buttonAriaDescription: _angular_core.Signal<string | null | undefined>;
321
+ protected readonly ariaDescribedby: _angular_core.Signal<string | null>;
322
+ /**
323
+ * Native aria-describedby attribute read from the DOM element.
324
+ * Captured once during init; signals user intent to manage describedby manually.
325
+ * @hidden
326
+ */
327
+ protected readonly nativeAriaDescribedBy: _angular_core.WritableSignal<string | null>;
328
+ /**
329
+ * Effective aria description: explicit input takes precedence over native attribute.
330
+ * Prioritizes ariaDescription input, falls back to native attribute.
331
+ * Empty string from ariaDescription is preserved (clears description).
332
+ * @hidden
333
+ */
334
+ protected readonly effectiveAriaDescription: _angular_core.Signal<string | null>;
335
+ /**
336
+ * Translated aria description for the current special button type, or null if not special.
337
+ * @hidden
338
+ */
339
+ protected readonly defaultButtonTypeDescription: _angular_core.Signal<string>;
340
+ /**
341
+ * Calculate aria-label attribute
342
+ * @hidden
343
+ */
344
+ protected readonly buttonArialabel: _angular_core.Signal<string | null | undefined>;
305
345
  /**
306
346
  * Computed CSS classes for the button.
307
347
  * Built as a string to avoid array allocation overhead.
@@ -320,8 +360,25 @@ declare class ButtonComponent extends BaseButton implements HasElementRef {
320
360
  * @hidden
321
361
  */
322
362
  private readonly _nativeAriaLabel;
363
+ /**
364
+ * Native aria-description attribute read from the DOM element.
365
+ * Captured once after render for use in aria-description computation.
366
+ * @hidden
367
+ */
368
+ private readonly _nativeAriaDescription;
369
+ /** @hidden Resolves per-key translation signals */
370
+ private readonly _translate;
371
+ /** @hidden Translated aria descriptions for each special button type */
372
+ private readonly _typeDescriptions;
323
373
  /** @hidden */
324
374
  constructor();
375
+ /**
376
+ * Capture native aria-label and aria-description attributes during initialization.
377
+ * Runs during ngOnInit to ensure attributes are captured before rendering the template.
378
+ * The native aria-description is removed from the DOM after capture to prevent
379
+ * duplicate accessibility attributes (ACC-264.1).
380
+ */
381
+ ngOnInit(): void;
325
382
  /** Forces the focus outline around the button, which is not default behavior in Safari. */
326
383
  protected clicked(event: Event): void;
327
384
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<ButtonComponent, never>;