Skip to content

Commit

Permalink
Create translation for aria-label in edit icon
Browse files Browse the repository at this point in the history
  • Loading branch information
cnasikas committed Feb 19, 2020
1 parent c3aba93 commit 4ed8b69
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ const EditableTitleComponent: React.FC<Props> = ({ onSubmit, isLoading, title })
</EuiFlexItem>
<EuiFlexItem grow={false}>
<StyledEuiButtonIcon
aria-label={title as string}
aria-label={i18n.EDIT_TITLE_ARIA(title as string)}
iconType="pencil"
onClick={onClickEditIcon}
data-test-subj="editable-title-edit-icon"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,9 @@ export const SUBMIT = i18n.translate('xpack.siem.header.editableTitle.submit', {
export const CANCEL = i18n.translate('xpack.siem.header.editableTitle.cancel', {
defaultMessage: 'Cancel',
});

export const EDIT_TITLE_ARIA = (title: string) =>
i18n.translate('xpack.siem.header.editableTitle.editButtonAria', {
values: { title },
defaultMessage: 'You can edit {title} by clicking',
});

0 comments on commit 4ed8b69

Please sign in to comment.