We're trying to address a bunch of accessibility issues, one in particular is proving quite difficult.
We need to supply for="" atributes for our components in order for screen readers to correctly read out the component details for users with accessibility needs.
The problem we've got is that we would have multiple of the same PCF on a screen, so we need the name="" attribute in our HTML to be unique - Ideally we'd like to grab the name as defined in the PowerApp designer, I thought there'd be a way to do this from the context object but I'm not seeing anything obvious.
Is this possible?
If not, the only workaround we can think of is to set the name attribute as a random string within the PCF itself but that's not a great idea.
Thanks.
Perfect, must have just missed that one! Thank you!
Hi @MCrawley2 ,
You could use context.mode.label (https://docs.microsoft.com/en-us/powerapps/developer/component-framework/reference/mode?WT.mc_id=BA-MVP-5004107#label)
If that's not appropriate, you could use the PCF parameteres : context.parameter.<your>.attributes ... In the worst case, you could even create a dedicated property for it, and let the maker decide.
Hope this helps!
WarrenBelz
109
Most Valuable Professional
Michael E. Gernaey
82
Super User 2025 Season 1
MS.Ragavendar
72