mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
[A11y] add aria label to change every instance on page (#188265)
## Summary Closes https://github.com/elastic/search-team/issues/7675 ### Checklist - [x] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)
This commit is contained in:
parent
a51b775391
commit
6750bea4d6
1 changed files with 7 additions and 0 deletions
|
@ -65,6 +65,13 @@ export const CodeBox: React.FC<CodeBoxProps> = ({
|
|||
<EuiContextMenuItem
|
||||
key={language.id}
|
||||
icon={`${assetBasePath}/${language.iconType}`}
|
||||
aria-label={i18n.translate(
|
||||
'searchApiPanels.welcomeBanner.codeBox.selectChangeAriaLabel',
|
||||
{
|
||||
defaultMessage: 'Change language to {languageName} for every instance on this page',
|
||||
values: { languageName: language.name },
|
||||
}
|
||||
)}
|
||||
onClick={() => {
|
||||
if (setSelectedLanguage) {
|
||||
setSelectedLanguage(language);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue