Open guardrex opened 8 months ago
@guardrex thanks for filing the issue.
We only set the name based on the @bind
attribute. We could if we want to set the id too, but that's up to the developer, not something that the component needs to necessarily take care on behalf-of.
Note that labels can also wrap the inputs and in that scenario they don't need to use for="<<id>>"
Thanks for contacting us.
We're moving this issue to the .NET 9 Planning
milestone for future evaluation / consideration. We would like to keep this around to collect more feedback, which can help us with prioritizing this work. We will re-evaluate this issue, during our next planning meeting(s).
If we later determine, that the issue has no community involvement, or it's very rare and low-impact issue, we will close it - so that the team can focus on more important and high impact issues.
To learn more about what to expect next and how this issue will be handled you can read more about our triage process here.
up to the developer
Sorry ... I should've been more specific. This issue refers to the Identity components in the project template. Therefore, this is a project template bug. Here's the ref source for the example that I show above ...
We will prioritize generating id
s for Blazor Identity components, so that the generated template code is correct.
Thanks for contacting us.
We're moving this issue to the .NET 9 Planning
milestone for future evaluation / consideration. We would like to keep this around to collect more feedback, which can help us with prioritizing this work. We will re-evaluate this issue, during our next planning meeting(s).
If we later determine, that the issue has no community involvement, or it's very rare and low-impact issue, we will close it - so that the team can focus on more important and high impact issues.
To learn more about what to expect next and how this issue will be handled you can read more about our triage process here.
Is there an existing issue for this?
Describe the bug
The
<label>
spec (4.10.4) calls for explicitly-labeled elements to have anid
that matches the<label>
'sfor
attribute. The Identity components don't haveid
set.For example, the
InputText
component of theLogin
component doesn't setid="email"
to match the<label>
'sfor
attribute ...Rendered ...
Therefore, the
control
andform
properties arenull
...When the
InputText
element is provided withid="email"
, theform
andcontrol
properties are set ...Expected Behavior
InputText
elements (and any other labeled elements) have anid
matching thefor
attribute oflabel
elements.Steps To Reproduce
None ... it's a template thing.
Exceptions (if any)
None ... the labels just no-op.
.NET Version
8.0.100
Anything else?
No response