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%7BghostArchiveUrl%7D/static/%7Bpost_view.post.url%7D?a=commitdiff_plain;h=87e8ce8d799ce57b45aef3deb115136ecf85bd39;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} >