Skip to content

Commit 671957f

Browse files
committed
fix(ui-components): refine language dropdown a11y for cross-browser consistency
1 parent f8010dc commit 671957f

File tree

1 file changed

+4
-2
lines changed
  • packages/ui-components/src/Common/LanguageDropDown

1 file changed

+4
-2
lines changed

packages/ui-components/src/Common/LanguageDropDown/index.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,15 @@ const LanguageDropdown: FC<LanguageDropDownProps> = ({
3838
{availableLanguages.map(({ name, code, localName, hrefLang }) => (
3939
<DropdownMenu.Item
4040
key={code}
41-
lang={hrefLang}
41+
aria-label={name}
4242
onClick={() => onChange({ name, code, localName, hrefLang })}
4343
className={classNames(styles.dropDownItem, {
4444
[styles.currentDropDown]: code === currentLanguage,
4545
})}
4646
>
47-
{localName}
47+
<span lang={hrefLang} aria-hidden="true">
48+
{localName}
49+
</span>
4850
</DropdownMenu.Item>
4951
))}
5052
</div>

0 commit comments

Comments
 (0)