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

Allow to override aria-label for full screen button and thumbnails #670

Open
leandrocrs opened this issue May 11, 2022 · 1 comment
Open

Comments

@leandrocrs
Copy link

Is your feature request related to a problem? Please describe.
We are using this component in a Brazilian Portuguese application, where some users lay on screen readers to navigate through application, and for our surprise we cannot override the Fullscreen button and thumbnails aria-labels to match our language.

Describe the solution you'd like
Allow to override the aria-label through props, os even better, allow to include whatever button props we want, like some frameworks does. Material-ui for example (see inputProps in the Input API Docs page.

  <ReactImageGallery fullscreenButtonProps={{ 'aria-label': 'My custom aria-label' }} // .... />

Describe alternatives you've considered
If allowing overwrite whatever prop is not intended for this moment, at last aria-label, maybe fullscreenButtonAriaLabel or fullscreenButtonProps={{ 'aria-label': 'My custom aria-label' }}.

For image thumbnail, would be a new prop inside ReactImageGalleryItem.

{
  // ...
 thumbnailAriaLabel: 'Ir para o slide 1',
  // ...
}

Additional context
Add any other context or screenshots about the feature request here.
N/A.

@xiaolin
Copy link
Owner

xiaolin commented Jun 21, 2022

You're able to override the fullscreen button via renderFullscreenButton.

Happy to support thumbnailAriaLabel for thumbnails, feel free to open PR.

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

No branches or pull requests

2 participants