From 6426f451eea0eaa50f6f439b845a774bd39a5b84 Mon Sep 17 00:00:00 2001 From: Sabrina Bongiovanni Date: Tue, 19 Sep 2023 15:33:50 +0200 Subject: [PATCH 1/4] fix: accessibility for selectInput --- RELEASE.md | 1 + src/components/ItaliaTheme/Search/Search.jsx | 7 ++++++- src/components/SelectInput/SelectInput.jsx | 6 +++++- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/RELEASE.md b/RELEASE.md index 1a154b4d6..fab9f6b7d 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -40,6 +40,7 @@ - Blocco info: Colori dentro editor di testo sistemati (bottoni draftJS) - I link nella modulistica mostrano la remoteUrl +- Sistemata accessibilità per il menu a tendina "Ordina Per" nella pagina di ricerca ## Versione 7.20.4 (13/09/2023) diff --git a/src/components/ItaliaTheme/Search/Search.jsx b/src/components/ItaliaTheme/Search/Search.jsx index f9ff08da6..07a89cbb3 100644 --- a/src/components/ItaliaTheme/Search/Search.jsx +++ b/src/components/ItaliaTheme/Search/Search.jsx @@ -643,9 +643,14 @@ const Search = () => { sortOnOptions.filter((o) => o.value === sortOn)[0] } label={intl.formatMessage(messages.orderBy)} - placeholder={intl.formatMessage(messages.orderBy)} + placeholder={ + sortOnOptions.find((o) => o.value === sortOn).label + } onChange={(opt) => setSortOn(opt.value)} options={sortOnOptions} + defaultValue={sortOnOptions.find( + (o) => o.value === 'relevance', + )} /> diff --git a/src/components/SelectInput/SelectInput.jsx b/src/components/SelectInput/SelectInput.jsx index 1c81e4739..2a72054fa 100644 --- a/src/components/SelectInput/SelectInput.jsx +++ b/src/components/SelectInput/SelectInput.jsx @@ -299,6 +299,7 @@ const SelectInput = ({ options, components = {}, reactSelect, + defaultValue, }) => { const intl = useIntl(); const Select = reactSelect.default; @@ -319,6 +320,7 @@ const SelectInput = ({ }} id={id} value={value} + defaultValue={defaultValue} onChange={onChange} options={options} placeholder={placeholder} @@ -326,7 +328,9 @@ const SelectInput = ({ isSearchable={isSearchable} isMulti={isMulti} isClearable={isClearable} - aria-label={placeholder} + aria-label={label} + aria-live="polite" + aria-labelledby={id} ariaLiveMessages={getSelectAriaLiveMessages(intl)} noOptionsMessage={() => intl.formatMessage(messages.select_noOptionsMessage) From aa4ee0e1165630698902adbac45761014a619606 Mon Sep 17 00:00:00 2001 From: Sabrina Bongiovanni Date: Tue, 19 Sep 2023 16:44:01 +0200 Subject: [PATCH 2/4] updated release note --- RELEASE.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/RELEASE.md b/RELEASE.md index fab9f6b7d..d4579510e 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -30,6 +30,12 @@ - ... --> +## Versione X.X.X (19/09/2023) + +### Fix + +- Sistemata accessibilità per il menu a tendina "Ordina Per" nella pagina di ricerca + ## Versione 7.21.0 (19/09/2023) ### Novità From fb831241a10ca0ef37750f592da74d51dd27be91 Mon Sep 17 00:00:00 2001 From: sabrina-bongiovanni <116291154+sabrina-bongiovanni@users.noreply.github.com> Date: Wed, 20 Sep 2023 09:53:21 +0200 Subject: [PATCH 3/4] Update RELEASE.md Co-authored-by: Martina Bustacchini <41484878+deodorhunter@users.noreply.github.com> --- RELEASE.md | 1 - 1 file changed, 1 deletion(-) diff --git a/RELEASE.md b/RELEASE.md index d4579510e..6fec978fa 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -46,7 +46,6 @@ - Blocco info: Colori dentro editor di testo sistemati (bottoni draftJS) - I link nella modulistica mostrano la remoteUrl -- Sistemata accessibilità per il menu a tendina "Ordina Per" nella pagina di ricerca ## Versione 7.20.4 (13/09/2023) From aa2dac78e19abfe527a08fbceed9c58a7d17c662 Mon Sep 17 00:00:00 2001 From: sabrina-bongiovanni <116291154+sabrina-bongiovanni@users.noreply.github.com> Date: Wed, 20 Sep 2023 09:53:25 +0200 Subject: [PATCH 4/4] Update RELEASE.md Co-authored-by: Martina Bustacchini <41484878+deodorhunter@users.noreply.github.com> --- RELEASE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RELEASE.md b/RELEASE.md index 6fec978fa..d49370d4e 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -34,7 +34,7 @@ ### Fix -- Sistemata accessibilità per il menu a tendina "Ordina Per" nella pagina di ricerca +- Migliorata l'accessibilità e il supporto Screen Reader per il menu a tendina "Ordina Per" nella pagina di ricerca ## Versione 7.21.0 (19/09/2023)