Open bsunderhus opened 1 year ago
It would be a good issue to solve, it's been tracked for Menu
in #18318
What would be the source of truth ? the aria-xxx
attribute or theid
?
What would be the source of truth? the
aria-xxx
attribute or theid
?
I'd assume the id
should be the source of truth, as that's the most expected property to be introduced by user.
What would be the source of truth? the
aria-xxx
attribute or theid
?I'd assume the
id
should be the source of truth, as that's the most expected property to be introduced by user.
In that case I think the forced render is fine.
Perhaps there might also be some way to do it on DOM with ref
? you could track the id through a ref and calling some kind of setUserId
callback in context could just update that directly in DOM
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.
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