Skip to content
This repository has been archived by the owner on May 24, 2024. It is now read-only.

[terra-form-select] - Fixed SR issues #3985

Merged
merged 10 commits into from
Nov 30, 2023
5 changes: 4 additions & 1 deletion packages/terra-form-select/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@
## 6.51.0 - (November 21, 2023)

* Added
* Added 'aria-invalid' attribute which will be set to true for error input fields and false when resolving errors.
* Added 'aria-invalid' attribute which will be set to true for error input fields and false when resolving errors.
supreethmr marked this conversation as resolved.
Show resolved Hide resolved

* Fixed
* Fixed ScreenReader reading undefined selected and left and parent extra information in `terra-form-select-combobox`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move this entry to unreleased section

Suggested change
* Fixed
* Fixed ScreenReader reading undefined selected and left and parent extra information in `terra-form-select-combobox`.
* Fixed
* Fixed screen reader response for `terra-form-select-combobox`.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated - 3f70c69


## 6.50.0 - (November 13, 2023)

Expand Down
2 changes: 1 addition & 1 deletion packages/terra-form-select/src/combobox/Frame.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ class Frame extends React.Component {
this.hasEscPressed = true;
event.stopPropagation();
this.closeDropdown();
} else if (!this.state.isOpen && keyCode === KeyCode.KEY_ESCAPE && this.hasEscPressed) {
} else if (!this.state.isOpen && keyCode === KeyCode.KEY_ESCAPE) {
this.hasEscPressed = false;
if (this.props.resetComboboxValue) {
this.props.resetComboboxValue();
Expand Down
5 changes: 1 addition & 4 deletions packages/terra-form-select/src/combobox/Menu.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import * as KeyCode from 'keycode-js';
import AddOption from '../shared/_AddOption';
import ClearOption from '../shared/_ClearOption';
import MenuUtil from '../shared/_MenuUtil';
import SharedUtil from '../shared/_SharedUtil';
import SearchResults from '../shared/_SearchResults';
import styles from '../shared/_Menu.module.scss';
import NoResults from '../shared/_NoResults';
Expand Down Expand Up @@ -239,9 +238,7 @@ class Menu extends React.Component {
results in reading the display text followed by reading the aria-live message which is
the display text + 'selected'
*/
if (!SharedUtil.isSafari()) {
this.props.visuallyHiddenComponent.current.innerText = `${option.props.display} ${selectedTxt}`;
}
this.props.visuallyHiddenComponent.current.innerText = `${option.props.value} ${selectedTxt}`;
}

onSelect(option.props.value, option);
Expand Down
2 changes: 1 addition & 1 deletion packages/terra-form-select/src/search/Frame.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ class Frame extends React.Component {
this.hasEscPressed = true;
event.stopPropagation();
this.closeDropdown();
} else if (!this.state.isOpen && keyCode === KeyCode.KEY_ESCAPE && this.hasEscPressed) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why hasEscPressed is removed

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hasEscPressed check will be preventing to clear selected item when dropdown Collapsed state and when pressing ESC key

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that is an expected behavior of. not clearing selected value on esc Key press. selected value should only be cleared only when allowClear prop is set to true

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated - 52f4495

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have made changes as per your suggestions.
1 => Added condition that selected value should be cleared onEsc when allowClear is set to true.
2 => Fixed VO it reads as select a color selected when value is cleared with esc key.

Attached screen record for your references.

Screen.Recording.2023-11-27.at.7.09.02.PM.mov

} else if (!this.state.isOpen && keyCode === KeyCode.KEY_ESCAPE) {
this.hasEscPressed = false;
if (this.props.resetComboboxValue) {
this.props.resetComboboxValue();
Expand Down
4 changes: 2 additions & 2 deletions packages/terra-form-select/translations/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"Terra.form.select.maxSelectionHelp": "{text} Elemente begrenzen.",
"Terra.form.select.maxSelectionOption": "Maximale Anzahl an ausgewählten {text} Elementen",
"Terra.form.select.noResults": "Keine Übereinstimmungen für \"{text}\"",
"Terra.form.select.selectedText": "Ausgewählt: {text}. ({index} von {totalOptions})",
"Terra.form.select.activeOption": "{text} ({index} von {totalOptions}).",
"Terra.form.select.selectedText": "Ausgewählt: {text}. {index} von {totalOptions}",
"Terra.form.select.activeOption": "{text} {index} von {totalOptions}.",
"Terra.form.select.of": "von",
"Terra.form.select.unselectedText": "{text} nicht ausgewählt",
"Terra.form.select.selected": "Ausgewählt",
Expand Down
4 changes: 2 additions & 2 deletions packages/terra-form-select/translations/en-AU.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"Terra.form.select.maxSelectionHelp": "Limit {text} items.",
"Terra.form.select.maxSelectionOption": "Maximum number of {text} items selected",
"Terra.form.select.ariaLabel": "Search",
"Terra.form.select.selectedText": "{text} Selected. ({index} of {totalOptions}).",
"Terra.form.select.activeOption": "{text} ({index} of {totalOptions}).",
"Terra.form.select.selectedText": "{text} Selected. {index} of {totalOptions}.",
"Terra.form.select.activeOption": "{text} {index} of {totalOptions}.",
"Terra.form.select.of": "of",
"Terra.form.select.unselectedText": "{text} Unselected.",
"Terra.form.select.selected": "Selected.",
Expand Down
4 changes: 2 additions & 2 deletions packages/terra-form-select/translations/en-CA.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"Terra.form.select.maxSelectionHelp": "Limit {text} items.",
"Terra.form.select.maxSelectionOption": "Maximum number of {text} items selected",
"Terra.form.select.ariaLabel": "Search",
"Terra.form.select.selectedText": "{text} Selected. ({index} of {totalOptions}).",
"Terra.form.select.activeOption": "{text} ({index} of {totalOptions}).",
"Terra.form.select.selectedText": "{text} Selected. {index} of {totalOptions}.",
"Terra.form.select.activeOption": "{text} {index} of {totalOptions}.",
"Terra.form.select.of": "of",
"Terra.form.select.unselectedText": "{text} Unselected.",
"Terra.form.select.selected": "Selected.",
Expand Down
4 changes: 2 additions & 2 deletions packages/terra-form-select/translations/en-GB.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"Terra.form.select.maxSelectionHelp": "Limit {text} items.",
"Terra.form.select.maxSelectionOption": "Maximum number of {text} items selected",
"Terra.form.select.ariaLabel": "Search",
"Terra.form.select.selectedText": "{text} Selected. ({index} of {totalOptions}).",
"Terra.form.select.activeOption": "{text} ({index} of {totalOptions}).",
"Terra.form.select.selectedText": "{text} Selected. {index} of {totalOptions}.",
"Terra.form.select.activeOption": "{text} {index} of {totalOptions}.",
"Terra.form.select.of": "of",
"Terra.form.select.unselectedText": "{text} Unselected",
"Terra.form.select.selected": "Selected.",
Expand Down
4 changes: 2 additions & 2 deletions packages/terra-form-select/translations/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"Terra.form.select.maxSelectionHelp": "Limit {text} items.",
"Terra.form.select.maxSelectionOption": "Maximum number of {text} items selected",
"Terra.form.select.ariaLabel": "Search",
"Terra.form.select.selectedText": "{text} Selected. ({index} of {totalOptions}).",
"Terra.form.select.activeOption": "{text} ({index} of {totalOptions}).",
"Terra.form.select.selectedText": "{text} Selected. {index} of {totalOptions}.",
"Terra.form.select.activeOption": "{text} {index} of {totalOptions}.",
"Terra.form.select.of": "of",
"Terra.form.select.unselectedText": "{text} Unselected.",
"Terra.form.select.selected": "Selected.",
Expand Down
4 changes: 2 additions & 2 deletions packages/terra-form-select/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"Terra.form.select.maxSelectionHelp": "Limit {text} items.",
"Terra.form.select.maxSelectionOption": "Maximum number of {text} items selected",
"Terra.form.select.ariaLabel": "Search",
"Terra.form.select.selectedText": "{text} Selected. ({index} of {totalOptions}).",
"Terra.form.select.activeOption": "{text} ({index} of {totalOptions}).",
"Terra.form.select.selectedText": "{text} Selected. {index} of {totalOptions}.",
"Terra.form.select.activeOption": "{text} {index} of {totalOptions}.",
"Terra.form.select.of": "of",
"Terra.form.select.unselectedText": "{text} Unselected.",
"Terra.form.select.selected": "Selected.",
Expand Down
4 changes: 2 additions & 2 deletions packages/terra-form-select/translations/es-ES.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"Terra.form.select.maxSelectionHelp": "Limite los elementos {text}.",
"Terra.form.select.maxSelectionOption": "Número máximo de elementos {text} seleccionados",
"Terra.form.select.ariaLabel": "Buscar",
"Terra.form.select.selectedText": "Se seleccionó {text}. ({index} de {totalOptions}).",
"Terra.form.select.activeOption": "{text} ({index} de {totalOptions}).",
"Terra.form.select.selectedText": "Se seleccionó {text}. {index} de {totalOptions}.",
"Terra.form.select.activeOption": "{text} {index} de {totalOptions}.",
"Terra.form.select.of": "de",
"Terra.form.select.unselectedText": "{text} sin seleccionar.",
"Terra.form.select.selected": "Seleccionado.",
Expand Down
4 changes: 2 additions & 2 deletions packages/terra-form-select/translations/es-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"Terra.form.select.maxSelectionHelp": "Limite los elementos {text}.",
"Terra.form.select.maxSelectionOption": "Número máximo de elementos {text} seleccionados",
"Terra.form.select.ariaLabel": "Buscar",
"Terra.form.select.selectedText": "Se seleccionó {text}. ({index} de {totalOptions}).",
"Terra.form.select.activeOption": "{text} ({index} de {totalOptions}).",
"Terra.form.select.selectedText": "Se seleccionó {text}. {index} de {totalOptions}.",
"Terra.form.select.activeOption": "{text} {index} de {totalOptions}.",
"Terra.form.select.of": "de",
"Terra.form.select.unselectedText": "{text} sin seleccionar.",
"Terra.form.select.selected": "Seleccionado.",
Expand Down
2 changes: 1 addition & 1 deletion packages/terra-form-select/translations/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"Terra.form.select.maxSelectionHelp": "Limite los elementos {text}.",
"Terra.form.select.maxSelectionOption": "Número máximo de elementos {text} seleccionados",
"Terra.form.select.ariaLabel": "Buscar",
"Terra.form.select.selectedText": "Se seleccionó {text}. ({index} de {totalOptions}).",
"Terra.form.select.selectedText": "Se seleccionó {text}. {index} de {totalOptions}.",
"Terra.form.select.activeOption": "{text} {index} de {totalOptions}.",
"Terra.form.select.of": "de",
"Terra.form.select.unselectedText": "{text} sin seleccionar.",
Expand Down
4 changes: 2 additions & 2 deletions packages/terra-form-select/translations/fi-FI.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"Terra.form.select.maxSelectionHelp": "Rajoita {text} kohdetta.",
"Terra.form.select.maxSelectionOption": "Valittujen {text} kohtien enimmäismäärä",
"Terra.form.select.noResults": "Ei ole vastaavia tuloksia \"{text}\"",
"Terra.form.select.selectedText": "{text} Valittu. ({index} / {totalOptions}).",
"Terra.form.select.activeOption": "{text} ({index} / {totalOptions}).",
"Terra.form.select.selectedText": "{text} Valittu. {index} / {totalOptions}.",
"Terra.form.select.activeOption": "{text} {index} / {totalOptions}.",
"Terra.form.select.of": "/",
"Terra.form.select.unselectedText": "{text} Valitsematon.",
"Terra.form.select.selected": "Valittu.",
Expand Down
4 changes: 2 additions & 2 deletions packages/terra-form-select/translations/fr-FR.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"Terra.form.select.maxSelectionHelp": "Limite de {text} éléments",
"Terra.form.select.maxSelectionOption": "{text} éléments maximum sélectionnés",
"Terra.form.select.noResults": "Aucun résultat correspondant pour \"{text}\"",
"Terra.form.select.selectedText": "{text} sélectionné. ({index} sur {totalOptions}).",
"Terra.form.select.activeOption": "{text} ({index} sur {totalOptions}).",
"Terra.form.select.selectedText": "{text} sélectionné. {index} sur {totalOptions}.",
"Terra.form.select.activeOption": "{text} {index} sur {totalOptions}.",
"Terra.form.select.of": "sur",
"Terra.form.select.unselectedText": "{text} désélectionné.",
"Terra.form.select.selected": "Sélectionné.",
Expand Down
4 changes: 2 additions & 2 deletions packages/terra-form-select/translations/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"Terra.form.select.maxSelectionHelp": "Limite de {text} éléments",
"Terra.form.select.maxSelectionOption": "{text} éléments maximum sélectionnés",
"Terra.form.select.noResults": "Aucun résultat correspondant pour \"{text}\"",
"Terra.form.select.selectedText": "{text} sélectionné. ({index} sur {totalOptions}).",
"Terra.form.select.activeOption": "{text} ({index} sur {totalOptions}).",
"Terra.form.select.selectedText": "{text} sélectionné. {index} sur {totalOptions}.",
"Terra.form.select.activeOption": "{text} {index} sur {totalOptions}.",
"Terra.form.select.of": "sur",
"Terra.form.select.unselectedText": "{text} désélectionné.",
"Terra.form.select.selected": "Sélectionné.",
Expand Down
2 changes: 1 addition & 1 deletion packages/terra-form-select/translations/nl-BE.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"Terra.form.select.maxSelectionOption": "Maximumaantal van {text} items geselecteerd",
"Terra.form.select.noResults": "Geen resultaten gevonden voor \"{text}\"",
"Terra.form.select.selectedText": "{text} geselecteerd. ({index} van {totalOptions})",
"Terra.form.select.activeOption": "{text} ({index} van {totalOptions}).",
"Terra.form.select.activeOption": "{text} {index} van {totalOptions}.",
"Terra.form.select.of": "van",
"Terra.form.select.unselectedText": "{text} niet geselecteerd.",
"Terra.form.select.selected": "Geselecteerd.",
Expand Down
4 changes: 2 additions & 2 deletions packages/terra-form-select/translations/nl.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"Terra.form.select.maxSelectionHelp": "Limiet: {text} items.",
"Terra.form.select.maxSelectionOption": "Maximumaantal van {text} items geselecteerd",
"Terra.form.select.noResults": "Geen resultaten gevonden voor \"{text}\"",
"Terra.form.select.selectedText": "{text} geselecteerd. ({index} van {totalOptions})",
"Terra.form.select.activeOption": "{text} ({index} van {totalOptions}).",
"Terra.form.select.selectedText": "{text} geselecteerd. {index} van {totalOptions}",
"Terra.form.select.activeOption": "{text} {index} van {totalOptions}.",
"Terra.form.select.of": "van",
"Terra.form.select.unselectedText": "{text} niet geselecteerd.",
"Terra.form.select.selected": "Geselecteerd.",
Expand Down
4 changes: 2 additions & 2 deletions packages/terra-form-select/translations/pt-BR.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"Terra.form.select.maxSelectionHelp": "Limite de itens de {text}.",
"Terra.form.select.maxSelectionOption": "Número máximo de itens de {text} selecionado",
"Terra.form.select.noResults": "Não há resultados para \"{text}\"",
"Terra.form.select.selectedText": "{text} selecionado. ({index} de {totalOptions}).",
"Terra.form.select.activeOption": "{text} ({index} de {totalOptions}).",
"Terra.form.select.selectedText": "{text} selecionado. {index} de {totalOptions}.",
"Terra.form.select.activeOption": "{text} {index} de {totalOptions}.",
"Terra.form.select.of": "de",
"Terra.form.select.unselectedText": "{text} não selecionado.",
"Terra.form.select.selected": "Selecionado.",
Expand Down
4 changes: 2 additions & 2 deletions packages/terra-form-select/translations/pt.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"Terra.form.select.maxSelectionHelp": "Limite de itens de {text}.",
"Terra.form.select.maxSelectionOption": "Número máximo de itens de {text} selecionado",
"Terra.form.select.noResults": "Não há resultados para \"{text}\"",
"Terra.form.select.selectedText": "{text} selecionado. ({index} de {totalOptions}).",
"Terra.form.select.activeOption": "{text} ({index} de {totalOptions}).",
"Terra.form.select.selectedText": "{text} selecionado. {index} de {totalOptions}.",
"Terra.form.select.activeOption": "{text} {index} de {totalOptions}.",
"Terra.form.select.of": "de",
"Terra.form.select.unselectedText": "{text} não selecionado.",
"Terra.form.select.selected": "Selecionado.",
Expand Down
4 changes: 2 additions & 2 deletions packages/terra-form-select/translations/sv-SE.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"Terra.form.select.maxSelectionHelp": "Max {text} objekt.",
"Terra.form.select.maxSelectionOption": "Maxantalet {text} objekt har valts",
"Terra.form.select.noResults": "Inga matchande resultat för \"{text}\"",
"Terra.form.select.selectedText": "{text} vald. ({index} av {totalOptions}).",
"Terra.form.select.activeOption": "{text} ({index} av {totalOptions}).",
"Terra.form.select.selectedText": "{text} vald. {index} av {totalOptions}.",
"Terra.form.select.activeOption": "{text} {index} av {totalOptions}.",
"Terra.form.select.of": "av",
"Terra.form.select.unselectedText": "{text} avmarkerad.",
"Terra.form.select.selected": "Vald.",
Expand Down
4 changes: 2 additions & 2 deletions packages/terra-form-select/translations/sv.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"Terra.form.select.maxSelectionHelp": "Max {text} objekt.",
"Terra.form.select.maxSelectionOption": "Maxantalet {text} objekt har valts",
"Terra.form.select.noResults": "Inga matchande resultat för \"{text}\"",
"Terra.form.select.selectedText": "{text} vald. ({index} av {totalOptions}).",
"Terra.form.select.activeOption": "{text} ({index} av {totalOptions}).",
"Terra.form.select.selectedText": "{text} vald. {index} av {totalOptions}.",
"Terra.form.select.activeOption": "{text} {index} av {totalOptions}.",
"Terra.form.select.of": "av",
"Terra.form.select.unselectedText": "{text} avmarkerad.",
"Terra.form.select.selected": "Vald.",
Expand Down
Loading