for loop - how can i make one for attribute of label for tow text field input in html -
we useing ibm rational policy test scan our codes , giving defect on username , password, asking label attribute, there way add label , label wont show on screen? if use empty label, software still giving me defect again different message
sign in <input class="user-name" placeholder="username" type="text" id="username" name="username"></input> <input class="password" placeholder="password" type="password" id="password" name="password"></input> <input type="checkbox" id="chkrememberme" name="chkrememberme"></input>
and message software: each form control should have associated text associate text each form control not of type "hidden". input controls of type "submit", "reset", , "button" require text set in "value" attribute. input controls of type "image" require text set in "alt" attribute. other form controls associated text via label element. label attached specific form control through use of "for" attribute. value of "for" attribute must same value of "id" attribute of form control.
simply adding them , hiding them via css should need --
<label for="username">username</label> <label for="password">password</label>
and in css:
label {display:none;}
do note though, better have labels associated items visible - makes easier accessibility well.
Comments
Post a Comment