-
Notifications
You must be signed in to change notification settings - Fork 812
[added] Apply custom data- and aria- props to content div #230
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
Conversation
…he user to define them
This looks good for aria attributes. |
@@ -18,6 +19,18 @@ var CLASS_NAMES = { | |||
} | |||
}; | |||
|
|||
function getCustomProps(props) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe move this function to a helper?
It would be great to have the ability to add ARIA attributes on the modal, this would be necessary for example when the modal content is mainly text: The text inside the modal won't be announced because screen readers enter in focus mode when |
Hi @Munter, we have |
@diasbruno Thanks for the heads up. I switched to react-a11y-modal because this was a blocker to me. I don't have the bandwidth to port this to v2 |
@Munter no problem. Thank you. |
@Munter Do you mind if I slice your PR and add to |
Take and modify whatever you need from this. It would be a fine addition to the library to get those features in |
Is this no longer supported? |
@WickyNilliams |
ah... i specifically wanted data-* attributes, as hooks for targeting elements in tests |
One option is place those attributes in a wrapper on the content <Modal ...>
<div data-x=... >...</div>
</Modal> |
@WickyNilliams Can you open a new issue to make it easy to track? |
Yeah that's what I did eventually, but not ideal. Sure thing! I'll make one now |
Changes proposed:
aria-*
anddata-*
props to the modal content divAcceptance Checklist:
CONTRIBUTING.md
.