Skip to content

Commit

Permalink
fix(core): more customization of aria attributes for multi-input (#12437
Browse files Browse the repository at this point in the history
)

* fix(core): more customization of aria attributes for multi-input

* fix: focusable element should not be aria-hidden
  • Loading branch information
mikerodonnell89 authored Sep 24, 2024
1 parent ffa12d2 commit 88d90b7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
3 changes: 2 additions & 1 deletion libs/core/multi-input/multi-input.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@
[isControl]="true"
[glyph]="showAddonButton ? glyph : ''"
[glyphFont]="glyphFont"
[addonButtonAriaHidden]="!!title"
(addOnButtonClicked)="_addOnButtonClicked($event)"
[glyphAriaLabel]="addOnButtonAriaLabel"
[iconTitle]="addonIconTitle"
>
<span [attr.id]="tokenHiddenId" aria-hidden="true" class="fd-multi-input__invisible-text">{{
Expand Down Expand Up @@ -102,6 +102,7 @@
[attr.id]="inputId"
(focus)="tokenizer._showAllTokens()"
(blur)="tokenizer._hideTokens()"
[attr.title]="title"
/>
</fd-tokenizer>
</fd-input-group>
Expand Down
6 changes: 5 additions & 1 deletion libs/core/multi-input/multi-input.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -373,10 +373,14 @@ export class MultiInputComponent<ItemType = any, ValueType = any>
@Input()
open = false;

/** Whether or not to display the addon button. */
/** Whether to display the addon button. */
@Input()
displayAddonButton = true;

/** Aria-label for the addon button. */
@Input()
addOnButtonAriaLabel: Nullable<string>;

/** @hidden */
private _tokenCountHiddenLabel = `fd-multi-input-token-count-id-${uniqueHiddenLabel++}`;

Expand Down

0 comments on commit 88d90b7

Please sign in to comment.