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

static aria-label, no possibility to change for other language #382

Open
DmitriBountsman opened this issue Jan 2, 2024 · 3 comments
Open

Comments

@DmitriBountsman
Copy link

There is no possibility to change aria-label either via a locale file or component properties. That breaks disability tests for other languages (in my case German).

<button type="button" onClick={onClose} aria-label="Close" className={`${prefixCls}-close`}>

@yoyo837
Copy link
Member

yoyo837 commented Jan 3, 2024

PR welcome

@DmitriBountsman
Copy link
Author

I will commit a PR with a new property in near future.

A quick fix is to set aria-label="Close" only when closeIcon is not set (e.g. in antd closeIcon is always set and has its own aria-label).
aria-label={closeIcon ? undefined : "Close"}

@DmitriBountsman
Copy link
Author

DmitriBountsman commented Jan 3, 2024

PR: #385

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants