From cfcc5e1f4e80fd7f0a2518185d5a9bf2a6184d86 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 27 Jan 2025 16:01:23 +0000 Subject: [PATCH 01/21] Bump @mdn/yari from 4.2.1 to 4.2.2 (#37830) --- package.json | 2 +- yarn.lock | 38 +++++++++++++++++++------------------- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/package.json b/package.json index 84a79a35d7de867..0ffa04523795185 100644 --- a/package.json +++ b/package.json @@ -47,7 +47,7 @@ "dependencies": { "@apideck/better-ajv-errors": "^0.3.6", "@caporal/core": "^2.0.7", - "@mdn/yari": "4.2.1", + "@mdn/yari": "4.2.2", "ajv": "^8.17.1", "ajv-formats": "^3.0.1", "async": "^3.2.6", diff --git a/yarn.lock b/yarn.lock index 67a73d138655aea..14ae4992eac4c89 100644 --- a/yarn.lock +++ b/yarn.lock @@ -954,10 +954,10 @@ resolved "https://registry.yarnpkg.com/@mdn/bcd-utils-api/-/bcd-utils-api-0.0.7.tgz#555e80c33df520df068943e6b18ebc07f0e24d19" integrity sha512-IHkkypEjlIkBkx4mJ2//Xbzog9M/Lzne1Sl8db2cIHJ/5pe3NCqSLwSchmqzcUN+/WJr/U+V3tNAbWunk2xZcA== -"@mdn/browser-compat-data@^5.6.32": - version "5.6.32" - resolved "https://registry.yarnpkg.com/@mdn/browser-compat-data/-/browser-compat-data-5.6.32.tgz#1b19eea918a458d6da77527b82cb935fe1ac8498" - integrity sha512-z5ygobHDF+1XrBK5opSziQT6uY76tpEb6JStUpFppnwgwmBslfsSuZDzHTl2SzqYX69Ge3kM//zNO0u8btcdow== +"@mdn/browser-compat-data@^5.6.33": + version "5.6.33" + resolved "https://registry.yarnpkg.com/@mdn/browser-compat-data/-/browser-compat-data-5.6.33.tgz#7936c50a4819fccad39ada5aff34418d1c8bbed0" + integrity sha512-56GEfTIgrPXAc9EL3MbJmv0QiIxZR/UzpOCzPtCGsW/IYr+3Bj1DbtBXnNMD2vOMqv1UVdCxy7LXxRcU+wxO5A== "@mdn/rari@^0.1.20": version "0.1.20" @@ -970,10 +970,10 @@ proxy-from-env "^1.1.0" tar "^7.4.3" -"@mdn/yari@4.2.1": - version "4.2.1" - resolved "https://registry.yarnpkg.com/@mdn/yari/-/yari-4.2.1.tgz#f7ba8b8a35420464fa7fc9e0ff34aa4312fea84d" - integrity sha512-4WN4cdYmz1lpZj1KlIK7BlarZfOobh3CxgsSC7mMVsY++0k3spSIhjXd7q/BM171dv3eFnl+FLI9tEUpIII8qg== +"@mdn/yari@4.2.2": + version "4.2.2" + resolved "https://registry.yarnpkg.com/@mdn/yari/-/yari-4.2.2.tgz#21767ba322b214c4ef606e880270e18737c8b32e" + integrity sha512-BfPD0cE06mtIYR7Ll73wrfHXDWd6egA47MOOaBs57InDtacmY6VM4bAF0A02ewPW2Y8lRm1B2mAMlz7MRkBseA== dependencies: "@caporal/core" "^2.0.7" "@codemirror/lang-css" "^6.3.1" @@ -986,7 +986,7 @@ "@lit/react" "^1.0.7" "@lit/task" "^1.0.2" "@mdn/bcd-utils-api" "^0.0.7" - "@mdn/browser-compat-data" "^5.6.32" + "@mdn/browser-compat-data" "^5.6.33" "@mdn/rari" "^0.1.20" "@mozilla/glean" "5.0.3" "@sentry/node" "^8.51.0" @@ -1037,7 +1037,7 @@ mdn-data "^2.15.0" open "^10.1.0" open-editor "^5.1.0" - openai "^4.80.0" + openai "^4.80.1" pg "^8.13.1" pgvector "^0.2.0" prism-svelte "^0.5.0" @@ -1064,7 +1064,7 @@ unist-builder "^4.0.0" unist-util-visit "^5.0.0" web-features "^2.19.0" - web-specs "^3.35.0" + web-specs "^3.36.0" "@mozilla/glean@5.0.3": version "5.0.3" @@ -6840,10 +6840,10 @@ open@^10.1.0: is-inside-container "^1.0.0" is-wsl "^3.1.0" -openai@^4.80.0: - version "4.80.0" - resolved "https://registry.yarnpkg.com/openai/-/openai-4.80.0.tgz#693e5be69a21ed31658a5e0cd8132056cd7a6fb8" - integrity sha512-5TqdNQgjOMxo3CkCvtjzuSwuznO/o3q5aak0MTy6IjRvPtvVA1wAFGJU3eZT1JHzhs2wFb/xtDG0o6Y/2KGCfw== +openai@^4.80.1: + version "4.80.1" + resolved "https://registry.yarnpkg.com/openai/-/openai-4.80.1.tgz#0869ae7d4efbe1794dbec9b648aa329d369cea36" + integrity sha512-+6+bbXFwbIE88foZsBEt36bPkgZPdyFN82clAXG61gnHb2gXdZApDyRrcAHqEtpYICywpqaNo57kOm9dtnb7Cw== dependencies: "@types/node" "^18.11.18" "@types/node-fetch" "^2.6.4" @@ -8916,10 +8916,10 @@ web-namespaces@^2.0.0: resolved "https://registry.yarnpkg.com/web-namespaces/-/web-namespaces-2.0.1.tgz#1010ff7c650eccb2592cebeeaf9a1b253fd40692" integrity sha512-bKr1DkiNa2krS7qxNtdrtHAmzuYGFQLiQ13TsorsdT6ULTkPLKuu5+GsFpDlg6JFjUTwX2DyhMPG2be8uPrqsQ== -web-specs@^3.35.0: - version "3.35.0" - resolved "https://registry.yarnpkg.com/web-specs/-/web-specs-3.35.0.tgz#27de67081d39d706ec44a03775dbc9166a38e297" - integrity sha512-C0Fs9B39exvcWvkf46jBumUoC4Ki4JMkcDh3bebTNKKksmo0j0tJ1V0Indkm4JH+Lc2PD+0ROrV2TMoYYHpjvA== +web-specs@^3.36.0: + version "3.36.0" + resolved "https://registry.yarnpkg.com/web-specs/-/web-specs-3.36.0.tgz#13cfe2ee9077755084f4e421cd0db4b03e386b15" + integrity sha512-aMv2R+GCDm+pLUkSR4aE2S6NbtSY9N4hdbg/xPQ0tVTN5wa7x6b+kGCbr2ycvjVgN/fKOxGle93+yUOtrYXdCg== web-streams-polyfill@4.0.0-beta.3: version "4.0.0-beta.3" From 76b213a01fbdea31bd7674810fa626f278a7dfcc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 27 Jan 2025 16:17:23 +0000 Subject: [PATCH 02/21] Bump lint-staged from 15.4.2 to 15.4.3 (#37828) --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 0ffa04523795185..af899dae1b23410 100644 --- a/package.json +++ b/package.json @@ -59,7 +59,7 @@ "gray-matter": "^4.0.3", "husky": "9.1.7", "js-yaml": "^4.1.0", - "lint-staged": "15.4.2", + "lint-staged": "15.4.3", "markdownlint-cli2": "0.17.2", "markdownlint-rule-search-replace": "1.2.0", "prettier": "3.4.2" diff --git a/yarn.lock b/yarn.lock index 14ae4992eac4c89..2f774f7230f8ca7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5612,10 +5612,10 @@ linkify-it@^5.0.0: dependencies: uc.micro "^2.0.0" -lint-staged@15.4.2: - version "15.4.2" - resolved "https://registry.yarnpkg.com/lint-staged/-/lint-staged-15.4.2.tgz#f986bcb6b03822a996c600447c692c69640c7607" - integrity sha512-gCqzB/Li281uZJgReNci+oXXqUEdrFAQAzTE/LwoxxiEuP41vozNe4BATS+4ehdqkWn+Z6bGc3EDcBja3npBVw== +lint-staged@15.4.3: + version "15.4.3" + resolved "https://registry.yarnpkg.com/lint-staged/-/lint-staged-15.4.3.tgz#e73587cc857f580c99f907abefe9ac8d8d5e74c1" + integrity sha512-FoH1vOeouNh1pw+90S+cnuoFwRfUD9ijY2GKy5h7HS3OR7JVir2N2xrsa0+Twc1B7cW72L+88geG5cW4wIhn7g== dependencies: chalk "^5.4.1" commander "^13.1.0" From b23adcb8016f0b5d7d5287960baf8281268d4ca0 Mon Sep 17 00:00:00 2001 From: Chris Mills Date: Mon, 27 Jan 2025 16:54:40 +0000 Subject: [PATCH 03/21] Write new basic forms article for learn (#37776) * Write new basic forms article for learn * Update files/en-us/learn_web_development/core/structuring_content/html_forms/index.md Co-authored-by: Brian Smith * Update files/en-us/learn_web_development/core/structuring_content/html_forms/index.md Co-authored-by: Brian Smith * Update files/en-us/learn_web_development/core/structuring_content/html_forms/index.md Co-authored-by: Brian Smith * Update files/en-us/learn_web_development/core/structuring_content/html_forms/index.md Co-authored-by: Brian Smith * Update files/en-us/learn_web_development/core/structuring_content/html_forms/index.md Co-authored-by: Brian Smith * Update files/en-us/learn_web_development/core/structuring_content/html_forms/index.md Co-authored-by: Brian Smith * Update files/en-us/learn_web_development/core/structuring_content/html_forms/index.md Co-authored-by: Brian Smith * Update files/en-us/learn_web_development/core/structuring_content/html_forms/index.md Co-authored-by: Brian Smith * improve consistency, fix typos * Update files/en-us/learn_web_development/core/structuring_content/html_forms/index.md Co-authored-by: Brian Smith * Update files/en-us/learn_web_development/core/structuring_content/html_forms/index.md Co-authored-by: Brian Smith * tweak to validation description --------- Co-authored-by: Brian Smith --- .../structuring_content/html_forms/index.md | 444 +++++++++++++++++- 1 file changed, 420 insertions(+), 24 deletions(-) diff --git a/files/en-us/learn_web_development/core/structuring_content/html_forms/index.md b/files/en-us/learn_web_development/core/structuring_content/html_forms/index.md index fe43fda5e577403..fb5a234b15b1478 100644 --- a/files/en-us/learn_web_development/core/structuring_content/html_forms/index.md +++ b/files/en-us/learn_web_development/core/structuring_content/html_forms/index.md @@ -8,10 +8,9 @@ page-type: tutorial-chapter {{PreviousMenuNext("Learn_web_development/Core/Structuring_content/Planet_data_table", "Learn_web_development/Core/Structuring_content/Debugging_HTML", "Learn_web_development/Core/Structuring_content")}} -> [!NOTE] -> The content in this article is currently incomplete, sorry about that! We are working hard to improve the MDN Learn Web Development section, and we will have places marked as incomplete ("TODO") finished soon. +HTML forms and buttons are powerful tools for interacting with a website's users. Most commonly, they provide users with controls to manipulate a user interface (UI) or input data when required. -HTML forms and buttons are powerful tools for interacting with users — most commonly they are used for collecting data from users or allowing them to control a user interface. In this article we provide an introduction to the basics of forms and buttons. +In this article, we provide an introduction to the basics of forms and buttons. There is a lot more to know — a lot of input types and form features are not mentioned — but this article will give you a solid foundation for most cases. You can learn the advanced or specialized uses on a need-to-know basis as part of the constant learning you'll do throughout your career. @@ -34,54 +33,451 @@ HTML forms and buttons are powerful tools for interacting with users — most co
  • An appreciation that forms and buttons are the main tools for users to interact with a website, along with links.
  • -
  • The common types of <button>: button, submit, and reset.
  • -
  • Common <input> types: text, number, file, checkbox, radio, password, and search.
  • +
  • Different button types.
  • +
  • Common <input> types.
  • Common attributes such as name and value.
  • -
  • Making forms accessible — Correct semantics, the <label> element, and the for attribute.
  • -
  • Other control types: <textarea>, <select>, and <option>.
  • -
  • Client-side validation basics — required, min, max, minlength, maxlength, and pattern.
  • The <form> element, and the basics of form submission.
  • +
  • Making forms accessible with labels and correct semantics.
  • +
  • Other control types: <textarea>, <select>, and <option>.
  • +
  • Client-side validation basics.
-> [!NOTE] -> There are a lot of input types and form features not explicitly mentioned here; the purpose is to get a good general introduction to buttons and form elements, and learn the most common cases. The advanced/specialized cases can be studied on a need-to-know basis, as part of a web developer's constant learning throughout their career. +## Interacting with users + +So far in the course, you have seen a couple of ways in which users can interact with the web: + +- [Links](/en-US/docs/Learn_web_development/Core/Structuring_content/Creating_links) can be used to navigate to different sections of content, either on the same page or a different page. +- [`