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

Add default aria label for close button in Modal component #843

Open
samyakj-eightfold opened this issue May 29, 2024 · 2 comments
Open
Assignees
Labels
bug Something isn't working

Comments

@samyakj-eightfold
Copy link
Contributor

Many modal instances use either "Close modal" or "Close panel" as the closeButtonAriaLabelText prop for Modal component. Since the developer is usually expected to specify the onClose functionality and not different props for close button, we can also provide the aria label by default (similar to the icon props for close button). Furthermore, it would bring consistency in aria label across different modals.

Screenshot 2024-05-30 at 1 12 49 AM

PR for the fix

@dkilgore-eightfold
Copy link
Contributor

dkilgore-eightfold commented May 30, 2024

The closeButtonAriaLabelText prop is available. Providing a default prop is only effective if the Locale is properly passed to the ConfigProvider as documented in Storybook. Given this is not the case in all but 5 of Eightfold's applications, I suggest using your own localized string

@dkilgore-eightfold
Copy link
Contributor

Re-opened as I found the default string is not being defined in Modal, only in Dialog. Both use BaseDialog as root.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants