Form Elements Must Have Labels

網站架設seo

總經理/帝王引擎 Vince Wu

2022-10-07
    內容大綱

問題:Form Elements Must Have Labels

Fix any of the following: Form element does not have an implicit (wrapped) <label> Form element does not have an explicit <label> aria-label attribute does not exist or is empty aria-labelledby attribute does not exist, references elements that do not exist or references elements that are empty Element has no title attribute Element has no placeholder attribute Element's default semantics were not overridden with role="none" or role="presentation"

圖片:

解答:

增加Lable標籤:如First name:<input type="text" id="firstname">改為

  1. <label for="firstname">First name:</label> <input type="text" id="firstname">
  2. <label>First name: <input type="text"></label>
  3. <input type="text" aria-label="Search">

其它資訊