Skip to content

AVT - Label 'For' attribute does not reference an appropriate form control

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

Description

Label 'For' attribute does not reference an appropriate form control

Environment

  • Project Settings Page
  • Project Creation Page
  • Profile Settings Page

Accessibility Checkpoint 1.3.1 Information and Relationships

Browsers

Google Chrome

Actual Results

Project Settings Page

  • The id project_visibility referenced by the for attribute of a label element is not a valid form input element or an element with id project_visibility is either null or does not exist.
    • Update: The project visibility <select> has data-qa-selector="project_visibility_dropdown", but there is no element with id="project_visibility nor is there a label referencing the same. The select has a visibly associated label, but not connected with for and this should be fixed. ⚠️
  • The id new_namespace_id referenced by the for attribute of a label element is not a valid form input element or an element with id new_namespace_id is either null or does not exist.
    • Update: This ID wasn't found in a recent scan.

Project Creation Page

  • The id project_namespace_id referenced by the for attribute of a label element is not a valid form input element or an element with id project_namespace_id is either null or does not exist.
    • Update: There are multiple instances of hidden labels and hidden inputs with project_namespace_id that should be investigated. ⚠️
  • The id project_visibility_level referenced by the for attribute of a label element is not a valid form input element or an element with id project_visibility_level is either null or does not exist.
    • Update: This seems to still be valid. There are several elements with an id similar to project_visibility_level_0, but no exact matches. ⚠️

Profile Settings Page

  • The id user_public_email referenced by the for attribute of a label element is not a valid form input element or an element with id user_public_email is either null or does not exist.
    • Update: A <select> element with the id exists so this is no longer a problem.

Expected Results

The label element's 'for' attribute must reference a non-null, non-empty unique ID in another valid form element such as an input, select or textarea, keygen, etc. Refer to the html specification for complete list of valid elements.

Edited by 🤖 GitLab Bot 🤖