From d78514c665eb90d7ab858bbf2b698e214e087b9f Mon Sep 17 00:00:00 2001 From: Jay Sitter Date: Fri, 23 Jun 2023 15:20:49 -0400 Subject: [PATCH] fix: Add aria-describedby for language warning --- .../components/common/language-select.tsx | 65 ++++++++++--------- 1 file changed, 36 insertions(+), 29 deletions(-) diff --git a/src/shared/components/common/language-select.tsx b/src/shared/components/common/language-select.tsx index 382eff1e..3caf5893 100644 --- a/src/shared/components/common/language-select.tsx +++ b/src/shared/components/common/language-select.tsx @@ -49,39 +49,41 @@ export class LanguageSelect extends Component { return this.props.iconVersion ? ( this.selectBtn ) : ( -
+
+ {this.props.multiple && this.props.showLanguageWarning && ( -
+ )} -
- -
- {this.selectBtn} - {this.props.multiple && ( - - )} -
+
+ {this.selectBtn} + {this.props.multiple && ( + + )}
); @@ -105,6 +107,11 @@ export class LanguageSelect extends Component { id={this.id} onChange={linkEvent(this, this.handleLanguageChange)} aria-label={I18NextService.i18n.t("language_select_placeholder")} + aria-describedby={ + this.props.multiple && this.props.showLanguageWarning + ? "lang-warning" + : "" + } multiple={this.props.multiple} disabled={this.props.disabled} >