App icon indicating copy to clipboard operation
App copied to clipboard

[med] HTML Validator: Many Pages: Multiple text fields are not associated with their labels

Open ogumen opened this issue 5 years ago • 0 comments

Action Performed:

  1. Using Chrome, open the site https://staging.new.expensify.com/
  2. Inspect the source code of the "Phone or Email" text field.
  3. Notice if the visual label is associated programmatically with the text field.

Expected Result:

The visual field label should be associated programmatically with the text field.

Actual Result:

The visual label is not associated programmatically with the text field.

HTML: <div class="css-1dbjc4n" style="margin-top: 12px;"><div dir="auto" class="css-901oao" style="color: rgb(11, 27, 52); font-family: GTAmericaExp-Regular; font-size: 13px; font-weight: 700; line-height: 18px; margin-bottom: 8px;">Enter your phone or email:</div><input autocapitalize="none" autocorrect="off" placeholder="Phone or Email" autocomplete="email" dir="auto" spellcheck="false" type="text" class="css-11aywtz r-tz77pi" value="" style="background-color: rgb(255, 255, 255); border-color: rgb(236, 236, 236); border-radius: 8px; border-width: 1px; color: rgb(11, 27, 52); font-family: GTAmericaExp-Regular; font-size: 15px; height: 42px; padding: 10px 12px; vertical-align: middle;"></div>

Other occurrences:

  1. Set password -> The visual labels are not associated programmatically with ‘Enter a password’ and 'Confirm the password' text fields.
  2. Payments -> The visual label of ‘Your PayPal username' text field has no programmatic association with the field.
  3. Chat -> Multi-line text edits for chat messages.
  4. Request a call overlay -> All text fields have the same issue.

Workaround:

No workaround

Area issue was found in:

Landing page, Set password page, Add payment method flow, Chat page, Request a call overlay.

Failed WCAG checkpoints

1.3.1

User impact:

On some environments the screen reader users might not understand the purpose of the fields if their labels are not announced.

Suggested resolution:

Use <label> tag to implement the visible field label and associate it with the text field using "for" attribute by mentioning the id of the field <input> as the value of "for" attribute. See: https://www.w3.org/WAI/tutorials/forms/labels/#associating-labels-explicitly

Platform:

Where is this issue occurring?

  • Web

Version Number: **Reproducible in staging?:**Yes Reproducible in production?: Notes/Photos/Videos: Any additional supporting documentation Issue reported by: Bug5179664_info_and_relationship_-enter_your_phone_or_email-_landing_page Bug5179664_labels_-form_fields-_set_password Bug5179664_labels_-your_paypal_username-_payments Chat-Input fields not associated with their visible labels-chat edit Chat-Input fields not associated with their visible labels-Request A Call

View all open jobs on GitHub

ogumen avatar Sep 23 '21 14:09 ogumen