Skip to content

Commit

Permalink
Add id, aria-label & aria-labelledby to all listboxes
Browse files Browse the repository at this point in the history
  • Loading branch information
mydea committed Sep 7, 2022
1 parent 19a90e2 commit 04e58eb
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
16 changes: 14 additions & 2 deletions addon/components/power-select.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,13 @@
(component 'power-select/search-message')
)
as |SearchMessage|}}
<SearchMessage @searchMessage={{this.searchMessage}} @select={{publicAPI}}/>
<SearchMessage
@searchMessage={{this.searchMessage}}
@select={{publicAPI}}
id={{listboxId}}
aria-label={{@ariaLabel}}
aria-labelledby={{@ariaLabelledBy}}
/>
{{/let}}
{{else if this.mustShowNoMessages}}
{{#let
Expand All @@ -134,7 +140,13 @@
(component 'power-select/no-matches-message')
)
as |NoMatchesMessage|}}
<NoMatchesMessage @noMatchesMessage={{this.noMatchesMessage}} @select={{publicAPI}} />
<NoMatchesMessage
@noMatchesMessage={{this.noMatchesMessage}}
@select={{publicAPI}}
id={{listboxId}}
aria-label={{@ariaLabel}}
aria-labelledby={{@ariaLabelledBy}}
/>
{{/let}}
{{else}}
{{#let
Expand Down
2 changes: 1 addition & 1 deletion addon/components/power-select/search-message.hbs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<ul class="ember-power-select-options" role="listbox">
<ul class="ember-power-select-options" role="listbox" ...attributes>
<li class="ember-power-select-option ember-power-select-option--search-message" role="option">
{{@searchMessage}}
</li>
Expand Down

0 comments on commit 04e58eb

Please sign in to comment.