-
Notifications
You must be signed in to change notification settings - Fork 322
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
fix(Dropdown): aria labels not passed to dropdown menu #2707
base: master
Are you sure you want to change the base?
fix(Dropdown): aria labels not passed to dropdown menu #2707
Conversation
@@ -30,7 +31,7 @@ const Menu = ({ children, Renderer, selectProps, dropdownMenuWrapperClassName, i | |||
return ( | |||
<components.Menu | |||
{...props} | |||
innerProps={{ ...props.innerProps, onScroll: props.onScroll }} | |||
innerProps={{ ...rendererProps.innerProps }} |
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.
this is breaking, isn't it?
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.
wait, who is ...props.innerProps
? it seem like this attr doesn't even exist on props
of menu
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.
Why would it be breaking? Now there is a bug that the props.innerProps
+ scroll is passed but the id
, role
and aria-label
are being ignored, so I just added them
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.
but is props.innerProps
even a thing? where does it come from?
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.
and if it is a thing, and it can contain id
, role
, aria-label
, it means it's breaking since it overrides this change now always override those 3.
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.
It comes from line 12, where the additional props are set
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.
but the Menu
component never gets a prop called inlineProps
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.
oh it's a "react-select" prop which is automatically passed, I see now
we need to make sure inlineProps
never includes one of those three
if it does, even in edge scenarios, it is kind of breaking
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.
Seem like it does contain it
https://react-select.com/props#replacing-components
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.
Is it under our control? is it always not containing it in current scenario? or consumers can somehow pass something to our Dropdown
causing it to pass innerProps
with different role
, id
, and aria-label
?
https://monday.monday.com/boards/3532714909/views/80492480/pulses/8085300950