ocket8888 commented on code in PR #6899:
URL: https://github.com/apache/trafficcontrol/pull/6899#discussion_r897289712
##########
experimental/traffic-portal/src/app/core/currentuser/currentuser.component.html:
##########
@@ -34,8 +34,8 @@ <h2>User Theme</h2>
<input matInput [(ngModel)]="editUser.username"
name="username" type="text" required/>
</mat-form-field>
<mat-form-field style="grid-area: z;">
- <mat-label>Full Name</mat-label>
- <input matInput [(ngModel)]="editUser.fullName"
name="fullName" type="text" required/>
+ <mat-label>Name</mat-label>
+ <input matInput [(ngModel)]="editUser.fullName"
name="Name" type="text" required/>
Review Comment:
The `name` attribute of an `input` is a programmatic name, not an
accessibility or otherwise human-readable name. It's meant to be the key in a
key-value pair submitted to the server in the request that results from the
form's submission. It also adds a property to the containing `HTMLFormElement`
in the DOM by the same name. So `document.forms[0].Name` with the value you
have. if it were `fullName`, then the HTMLFormElement at `document.forms[0]`
would actually fulfill the `User` interface. Instead this will make it have one
property with a differing name.
For all these reasons, the `name` attribute here should remain `fullName`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]