-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
[Feature]: sharing IDREF between compound components #24163
Comments
It would be a good issue to solve, it's been tracked for |
What would be the source of truth ? the |
I'd assume the |
In that case I think the forced render is fine. Perhaps there might also be some way to do it on DOM with |
Because this issue has not had activity for over 150 days, we're automatically closing it for house-keeping purposes. Still require assistance? Please, create a new issue with up-to date details. |
Because this issue has not had activity for over 150 days, we're automatically closing it for house-keeping purposes. Still require assistance? Please, create a new issue with up-to date details. |
Because this issue has not had activity for over 150 days, we're automatically closing it for house-keeping purposes. Still require assistance? Please, create a new issue with up-to date details. |
Because this issue has not had activity for over 150 days, we're automatically closing it for house-keeping purposes. Still require assistance? Please, create a new issue with up-to date details. |
This issue has not had activity for over 180 days! We're adding Soft close label and will close it soon for house-keeping purposes. |
1 similar comment
This issue has not had activity for over 180 days! We're adding Soft close label and will close it soon for house-keeping purposes. |
Library
React Components / v9 (@fluentui/react-components)
Describe the feature that you would like added
Current behavior
Most of v9 components introduce a default ID by context and passing it down the line to its compound component to consume.
Problem Statement
Some ARIA Patterns require Id references being shared between compound components through Context to ensure functionality, for example:
aria-labelledby
,aria-describedby
,aria-controls
, etc,.In the example usage above of
MenuGroup
andMenuGroupHeader
, If the user provides its own id toMenuGroupHeader
, and stops using the one provided by context, thenMenuGroup
would start pointingaria-labelledby
to the wrong place. Current solution is documenting this problem and stating for the user that it is its own job to re-introduce the properaria-labelledby
attribute on its own:Feature Request
To solve this problem, some sort of context mechanism to add IDREF between compound components is required.
One problem with this is the extra render this would require in the case a child component updates its id reference to its parent, but so far, I can't think of a better solution.
THIS IS STILL OPEN FOR DEBATE
Have you discussed this feature with our team
teams-prague
Additional context
No response
Validations
The text was updated successfully, but these errors were encountered: