Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect uses of <label> found throughout the UI #2653

Open
leafty opened this issue Jul 12, 2023 · 0 comments
Open

Incorrect uses of <label> found throughout the UI #2653

leafty opened this issue Jul 12, 2023 · 0 comments
Labels

Comments

@leafty
Copy link
Member

leafty commented Jul 12, 2023

The <label> element is specifically designed to label form fields and should only be used for that purpose.

See also: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/label

Most notably, incorrect <label> elements create bugs in the new session page, where clicking on "Branch" or "Commit" triggers clicking on the "refresh" button.

image

Fix: Use <label> only to label form field and always specify for= to target the desired field. Other elements should use <div> or <div class="form-label"> instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Todo
Development

No branches or pull requests

2 participants