Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[EuiFilePicker] update aria-label for Remove button #7860

Merged
merged 3 commits into from
Jun 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions packages/eui/changelogs/upcoming/7860.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
**Accessibility**

- Updated the `aria-label` attribute for the `EuiFilePicker` remove file button
10 changes: 5 additions & 5 deletions packages/eui/src/components/form/file_picker/file_picker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -144,10 +144,10 @@ export class EuiFilePickerClass extends Component<

return (
<EuiI18n
token="euiFilePicker.clearSelectedFiles"
default="Clear selected files"
token="euiFilePicker.removeSelectedAriaLabel"
default="Remove selected files"
>
{(clearSelectedFiles: string) => {
{(removeSelectedAriaLabel: string) => {
const {
stylesMemoizer,
id,
Expand Down Expand Up @@ -244,7 +244,7 @@ export class EuiFilePickerClass extends Component<
if (normalFormControl) {
clearButton = (
<EuiFormControlLayoutClearButton
aria-label={clearSelectedFiles}
aria-label={removeSelectedAriaLabel}
css={[styles.euiFilePicker__clearButton, rightIconStyles]}
className="euiFilePicker__clearButton"
onClick={this.removeFiles}
Expand All @@ -254,7 +254,7 @@ export class EuiFilePickerClass extends Component<
} else {
clearButton = (
<EuiButtonEmpty
aria-label={clearSelectedFiles}
aria-label={removeSelectedAriaLabel}
css={styles.euiFilePicker__clearButton}
className="euiFilePicker__clearButton"
size="xs"
Expand Down
Loading