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
cs/move aria label #6269
cs/move aria label #6269
Conversation
I think we should just forward |
But isn't it more intuitive that the props you pass to a component go to what it is rendering directly, and also more accessibility friendly? const Component = (props) => {
return (
<div {...props}> {/*It makes sense that props would be forwarded here*/}
<span {...props}> </span> {/* instead of here */}
</div>
) May I ask why single out only 2 aria props? Is there an accessibility bonus to giving to the child vs. the parent? |
According to the accessibility docs on dialogs, you would only really need the two aria properties anyways (aria-label might be debatable because a modal should have a visible title?). |
Oh alright, do you recommend I close this PR or should I just update it to accept |
Feel free to amend this PR |
- explicitly defining aria-label
Amended the PR, hope this is satisfactory |
Looks good. Could you add a test please? |
Alrighty, added one :) Tried to follow the same test for the labelledby |
Looks good, thanks! |
Issue: #5953
Effects
Verify
aria-label="foo"
. Previously the prop would be passed to the first child instead of the parentQuick note:
This is my first time contributing to a big library like this, please let me know if anything should be changed in PR/code formatting. Thank you.