Open samyakj-eightfold opened 4 months ago
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
Re-opened as I found the default string is not being defined in Modal, only in Dialog. Both use BaseDialog as root.
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.
PR for the fix