Skip to content

Commit

Permalink
Fix @ariaActiveDescendant value (#1717)
Browse files Browse the repository at this point in the history
If there are no search results (hence no highlighted index) we don't expose value for `aria-active-descendant` (we currently show a truncated, invalid value)
  • Loading branch information
alex-ju authored Feb 29, 2024
1 parent 6ccd4cf commit 61d7c2e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ember-power-select/src/components/power-select.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@
@placeholderComponent={{or @placeholderComponent (component 'power-select/placeholder')}}
@extra={{@extra}}
@listboxId={{listboxId}}
@ariaActiveDescendant={{concat publicAPI.uniqueId "-" this.highlightedIndex}}
@ariaActiveDescendant={{if this.highlightedIndex (concat publicAPI.uniqueId "-" this.highlightedIndex)}}
@selectedItemComponent={{ensure-safe-component @selectedItemComponent}}
@searchPlaceholder={{@searchPlaceholder}}
@ariaLabel={{@ariaLabel}}
Expand Down

0 comments on commit 61d7c2e

Please sign in to comment.