From: Jay Sitter Date: Fri, 23 Jun 2023 19:20:49 +0000 (-0400) Subject: fix: Add aria-describedby for language warning X-Git-Url: http://these/git/%7B%60%24%7BwebArchiveUrl%7D/%22%7B%7D/%7B?a=commitdiff_plain;h=d78514c665eb90d7ab858bbf2b698e214e087b9f;p=lemmy-ui.git fix: Add aria-describedby for language warning --- diff --git a/src/shared/components/common/language-select.tsx b/src/shared/components/common/language-select.tsx index 382eff1..3caf589 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 && ( -
- {I18NextService.i18n.t("undetermined_language_warning")} -
- )} -
- + )} +
+ {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} >