From fa3ed704176d5d7b5d085352759b7669a5d051d6 Mon Sep 17 00:00:00 2001 From: Francesco Novy Date: Wed, 4 Dec 2019 12:41:05 +0100 Subject: [PATCH] Add aria-label & aria-labelled-by to single select search input Otherwise, the input has no label. This also removes the role="combobox" from the input, as that is redundant for input type="search" and axe also complains about it. --- addon/templates/components/power-select.hbs | 2 ++ .../components/power-select/before-options.hbs | 10 +++++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/addon/templates/components/power-select.hbs b/addon/templates/components/power-select.hbs index c3ce65246..438f93302 100644 --- a/addon/templates/components/power-select.hbs +++ b/addon/templates/components/power-select.hbs @@ -84,6 +84,8 @@ @listboxId={{listboxId}} @selectedItemComponent={{@selectedItemComponent}} @searchPlaceholder={{@searchPlaceholder}} + @ariaLabel={{@ariaLabel}} + @ariaLabelledBy={{@ariaLabelledBy}} /> {{/let}} {{#if this.mustShowSearchMessage}} diff --git a/addon/templates/components/power-select/before-options.hbs b/addon/templates/components/power-select/before-options.hbs index 14be9f0b9..e77bc2450 100644 --- a/addon/templates/components/power-select/before-options.hbs +++ b/addon/templates/components/power-select/before-options.hbs @@ -1,12 +1,16 @@ {{#if @searchEnabled}}