-
Notifications
You must be signed in to change notification settings - Fork 26.6k
Closed as not planned
Closed as not planned
Copy link
Labels
area: compilerIssues related to `ngc`, Angular's template compilerIssues related to `ngc`, Angular's template compiler
Milestone
Description
Which @angular/* package(s) are relevant/related to the feature request?
@angular/compiler-cli
Description
Currently in Angular, it is possible to bind both [attr.aria-] (direct HTML attribute) and [ariaX] (DOM property) on the same element. When both bindings exist for the same ARIA attribute, Angular silently prioritizes [attr.aria-] and ignores the [ariaX] binding. This can cause unexpected behavior and developer confusion.
Proposed Feature:
Introduce a compiler diagnostic that detects and warns when both [attr.aria-*] and [ariaX] bindings target the same ARIA attribute.
<div [attr.aria-label]="'Here label'"
[ariaLabel]="'Test label '">
</div>
Similar behavior also occurs with multiple repeated input bindings.
Proposed solution
Add diagnostic
Alternatives considered
Only working for duplicate inputs don't allow more specify case
Metadata
Metadata
Assignees
Labels
area: compilerIssues related to `ngc`, Angular's template compilerIssues related to `ngc`, Angular's template compiler