From 9aaa574f02cc19aba895c719718f424b0c9f8223 Mon Sep 17 00:00:00 2001 From: Jason Ren <40999116+jasonren0403@users.noreply.github.com> Date: Thu, 14 Aug 2025 17:59:06 +0800 Subject: [PATCH 1/6] update zh-cn translation of htmlsidebar (#40701) --- files/sidebars/htmlsidebar.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/files/sidebars/htmlsidebar.yaml b/files/sidebars/htmlsidebar.yaml index 5efdc1c7f29c203..6f67ba63630de2e 100644 --- a/files/sidebars/htmlsidebar.yaml +++ b/files/sidebars/htmlsidebar.yaml @@ -139,5 +139,9 @@ l10n: HTML_Elements: HTML 元素 Global_attributes: 全局属性 Attributes: 属性 + Attributes_element: 按元素划分的属性 + Attribute_values: 属性值 Input_types: <input> 类型 + Script_types: <script> 类型 + Rel_keywords: rel 关键字 Guides: 指南 From cda46c8d8533d3b14f197a15a63b97bd6d272247 Mon Sep 17 00:00:00 2001 From: zhan7236 <76658920+zhan7236@users.noreply.github.com> Date: Thu, 14 Aug 2025 18:00:42 +0800 Subject: [PATCH 2/6] update zh-CN translation of mathmlref (#40716) update zh-cn translation of mathmlref Co-authored-by: Vadim Makeev --- files/sidebars/mathmlref.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/files/sidebars/mathmlref.yaml b/files/sidebars/mathmlref.yaml index 5d06de9b5f0d1ac..4d0da126ffd8205 100644 --- a/files/sidebars/mathmlref.yaml +++ b/files/sidebars/mathmlref.yaml @@ -81,3 +81,4 @@ l10n: Global attributes: 全局属性 Guides: 指南 Examples: 示例 + Beginners: 初学者教程 From c71bdfc071c3d86009286734f2c8437243e4ad1f Mon Sep 17 00:00:00 2001 From: Jake Archibald Date: Thu, 14 Aug 2025 11:02:02 +0100 Subject: [PATCH 3/6] Add note about issues with popover default styles (#40723) * Add note about issues with popover default styles * Tweaks * Update popover positioning notes to include links to default styles --- files/en-us/web/api/popover_api/using/index.md | 6 ++++++ files/en-us/web/css/anchor/index.md | 13 +++++++++++++ files/en-us/web/css/position-area/index.md | 13 +++++++++++++ 3 files changed, 32 insertions(+) diff --git a/files/en-us/web/api/popover_api/using/index.md b/files/en-us/web/api/popover_api/using/index.md index 1aa85c7d67f5888..75efd45c896b64e 100644 --- a/files/en-us/web/api/popover_api/using/index.md +++ b/files/en-us/web/api/popover_api/using/index.md @@ -434,6 +434,8 @@ For example, you could use a combination of {{cssxref("anchor()")}} function val ```css .my-popover { + margin: 0; + inset: auto; bottom: calc(anchor(top) + 20px); justify-self: anchor-center; } @@ -443,10 +445,14 @@ Or you could use a {{cssxref("position-area")}} property: ```css .my-popover { + margin: 0; + inset: auto; position-area: top; } ``` +When using {{cssxref("position-area")}} or {{cssxref("anchor()")}} to position popovers, be aware that [the default styles for popovers](https://html.spec.whatwg.org/multipage/rendering.html#flow-content-3:~:text=%5Bpopover%5D%20%7B) may conflict with the position you're trying to achieve. The usual culprits are the default styles for `margin` and `inset`, so it's advisable to reset those, as in the examples above. The CSS working group is [looking at ways to avoid requiring this workaround](https://github.com/w3c/csswg-drafts/issues/10258). + See [Using CSS anchor positioning](/en-US/docs/Web/CSS/CSS_anchor_positioning/Using#positioning_elements_relative_to_their_anchor) for more details on associating anchor and positioned elements, and positioning elements relative to their anchor. > [!NOTE] diff --git a/files/en-us/web/css/anchor/index.md b/files/en-us/web/css/anchor/index.md index 44e879a56f0c86b..323c7a53219d15b 100644 --- a/files/en-us/web/css/anchor/index.md +++ b/files/en-us/web/css/anchor/index.md @@ -131,6 +131,19 @@ The below table lists the inset properties, and the `` parameter va | `inset-block-start` and `inset-block-end` | `start`, `end`, `self-start`, and `self-end`
`top` and `bottom` in horizontal writing modes
`left` and `right` in vertical writing modes | | `inset-inline-start` and `inset-inline-end` | `start`, `end`, `self-start`, and `self-end`
`left` and `right` in horizontal writing modes
`top` and `bottom` in vertical writing modes | +### Using `anchor()` to position popovers + +When using `anchor()` to position [popovers](/en-US/docs/Web/HTML/Reference/Global_attributes/popover), be aware that [the default styles for popovers](https://html.spec.whatwg.org/multipage/rendering.html#flow-content-3:~:text=%5Bpopover%5D%20%7B) may conflict with the position you're trying to achieve. The usual culprits are the default styles for `margin` and `inset`, so it's advisable to reset those: + +```css +.positionedPopover { + margin: 0; + inset: auto; +} +``` + +The CSS working group is [looking at ways to avoid requiring this workaround](https://github.com/w3c/csswg-drafts/issues/10258). + ### Using `anchor()` inside `calc()` When the `anchor()` function refers to a side of the default anchor, you can include a {{cssxref("margin")}} to create spacing between the edges of the anchor and positioned element as needed. Alternatively, you can include the `anchor()` function within a {{cssxref("calc")}} function to add spacing. diff --git a/files/en-us/web/css/position-area/index.md b/files/en-us/web/css/position-area/index.md index dcd3e314f68f560..4411420a9aa0066 100644 --- a/files/en-us/web/css/position-area/index.md +++ b/files/en-us/web/css/position-area/index.md @@ -115,6 +115,19 @@ If the positioned element is placed in a single top-center, bottom-center, or ce If the positioned element is placed in any other single grid square (say with `position-area: top left`) or is set to span two or more grid squares (for example using `position-area: bottom span-all`), it will align with the specified grid area but behave as if it has a {{cssxref("width")}} of `max-content` set on it. It is being sized according to its containing block size, which is the size imposed on it when it was set to `position: fixed`. It will stretch as wide as the text content, although it may also be constrained by the edge of the ``. +### Using `position-area` to position popovers + +When using `position-area` to position [popovers](/en-US/docs/Web/HTML/Reference/Global_attributes/popover), be aware that [the default styles for popovers](https://html.spec.whatwg.org/multipage/rendering.html#flow-content-3:~:text=%5Bpopover%5D%20%7B) may conflict with the position you're trying to achieve. The usual culprits are the default styles for `margin` and `inset`, so it's advisable to reset those: + +```css +.my-popover { + margin: 0; + inset: auto; +} +``` + +The CSS working group is [looking at ways to avoid requiring this workaround](https://github.com/w3c/csswg-drafts/issues/10258). + ## Formal definition {{cssinfo}} From 94ffd165232b5205418f8aa57127ee0854421db2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Viktor=20Sz=C3=A9pe?= Date: Thu, 14 Aug 2025 12:08:03 +0200 Subject: [PATCH 4/6] Fix typos (#40733) --- .vscode/dictionaries/terms-abbreviations.txt | 1 - files/en-us/web/api/dommatrixreadonly/flipy/index.md | 2 +- files/en-us/web/api/fetchlater_api/fetchlater_quotas/index.md | 2 +- files/en-us/web/api/gamepadpose/index.md | 2 +- files/en-us/web/api/gamepadpose/orientation/index.md | 2 +- .../publickeycredential/getclientcapabilities_static/index.md | 4 ++-- files/en-us/web/api/sanitizer/index.md | 2 +- files/en-us/web/api/vrpose/index.md | 2 +- files/en-us/web/api/vrpose/orientation/index.md | 2 +- .../headers/permissions-policy/deferred-fetch/index.md | 2 +- 10 files changed, 10 insertions(+), 11 deletions(-) diff --git a/.vscode/dictionaries/terms-abbreviations.txt b/.vscode/dictionaries/terms-abbreviations.txt index 26627b6e667b437..64b062353e3144b 100644 --- a/.vscode/dictionaries/terms-abbreviations.txt +++ b/.vscode/dictionaries/terms-abbreviations.txt @@ -545,7 +545,6 @@ QPACK QTFF qtrs quantizer -quarternion querysets quicklinks quickmenu diff --git a/files/en-us/web/api/dommatrixreadonly/flipy/index.md b/files/en-us/web/api/dommatrixreadonly/flipy/index.md index ede07caf3652d98..4e0dae10673f47b 100644 --- a/files/en-us/web/api/dommatrixreadonly/flipy/index.md +++ b/files/en-us/web/api/dommatrixreadonly/flipy/index.md @@ -28,7 +28,7 @@ A [`DOMMatrix`](/en-US/docs/Web/API/DOMMatrix). ### Inverting a triangle -In this example, the SVG contains two identical [paths](/en-US/docs/Web/SVG/Reference/Attribute/d) in the shape of a triangle; they are both drawn to have the same size and position. The view box has a negative y value showing us content from both sides of the y-axis. This enables the flipped triangle to be withing the viewport after it is transformed. +In this example, the SVG contains two identical [paths](/en-US/docs/Web/SVG/Reference/Attribute/d) in the shape of a triangle; they are both drawn to have the same size and position. The view box has a negative y value showing us content from both sides of the y-axis. This enables the flipped triangle to be within the viewport after it is transformed. #### HTML diff --git a/files/en-us/web/api/fetchlater_api/fetchlater_quotas/index.md b/files/en-us/web/api/fetchlater_api/fetchlater_quotas/index.md index 81cf4bc80e03088..604af6d348b3e6e 100644 --- a/files/en-us/web/api/fetchlater_api/fetchlater_quotas/index.md +++ b/files/en-us/web/api/fetchlater_api/fetchlater_quotas/index.md @@ -48,7 +48,7 @@ By default, subframes of subframes are not allocated a quota and so cannot use ` When quotas are exceeded, a `QuotaExceededError` is thrown when the {{domxref('Window.fetchLater()','fetchLater()')}} method is called to initiate the deferred request. -Permissions Policy checks are not discernable from quota checks. Calling `fetchLater()` will throw a `QuotaExceededError` both if the quota is actually exceeded and if the quota was restricted for that origin via a Permissions Policy. +Permissions Policy checks are not discernible from quota checks. Calling `fetchLater()` will throw a `QuotaExceededError` both if the quota is actually exceeded and if the quota was restricted for that origin via a Permissions Policy. Callers of `fetchLater()` should be defensive and catch `QuotaExceededError` errors in almost all cases, especially if they embed third-party JavaScript. diff --git a/files/en-us/web/api/gamepadpose/index.md b/files/en-us/web/api/gamepadpose/index.md index eb4302ddfa08a92..6e9f45a024d7c7e 100644 --- a/files/en-us/web/api/gamepadpose/index.md +++ b/files/en-us/web/api/gamepadpose/index.md @@ -26,7 +26,7 @@ This interface is accessible through the {{domxref("Gamepad.pose")}} property. - {{domxref("GamepadPose.linearAcceleration")}} {{ReadOnlyInline}} {{Experimental_Inline}} - : Returns the linear acceleration of the {{domxref("Gamepad")}}, in meters per second per second. - {{domxref("GamepadPose.orientation")}} {{ReadOnlyInline}} {{Experimental_Inline}} - - : Returns the orientation of the {{domxref("Gamepad")}}, as a quarternion value. + - : Returns the orientation of the {{domxref("Gamepad")}}, as a quaternion value. - {{domxref("GamepadPose.angularVelocity")}} {{ReadOnlyInline}} {{Experimental_Inline}} - : Returns the angular velocity of the {{domxref("Gamepad")}}, in radians per second. - {{domxref("GamepadPose.angularAcceleration")}} {{ReadOnlyInline}} {{Experimental_Inline}} diff --git a/files/en-us/web/api/gamepadpose/orientation/index.md b/files/en-us/web/api/gamepadpose/orientation/index.md index 07e0ffd107b818c..fdaeddad6bc4689 100644 --- a/files/en-us/web/api/gamepadpose/orientation/index.md +++ b/files/en-us/web/api/gamepadpose/orientation/index.md @@ -10,7 +10,7 @@ browser-compat: api.GamepadPose.orientation {{APIRef("WebVR API")}}{{SeeCompatTable}} -The **`orientation`** read-only property of the {{domxref("GamepadPose")}} interface returns the orientation of the {{domxref("Gamepad")}}, as a quarternion value. +The **`orientation`** read-only property of the {{domxref("GamepadPose")}} interface returns the orientation of the {{domxref("Gamepad")}}, as a quaternion value. The value is a {{jsxref("Float32Array")}}, made up of the following values: diff --git a/files/en-us/web/api/publickeycredential/getclientcapabilities_static/index.md b/files/en-us/web/api/publickeycredential/getclientcapabilities_static/index.md index ad9304eae103c16..d0f3c19c329ecac 100644 --- a/files/en-us/web/api/publickeycredential/getclientcapabilities_static/index.md +++ b/files/en-us/web/api/publickeycredential/getclientcapabilities_static/index.md @@ -176,9 +176,9 @@ function log(text) { The code is similar to the previous example, except that we check a particular returned capability, and we use `try...catch` to catch the case where `getClientCapabilities()` is not supported. ```js -checkisUserVerifyingPlatformAuthenticatorAvailable(); +checkIsUserVerifyingPlatformAuthenticatorAvailable(); -async function checkisUserVerifyingPlatformAuthenticatorAvailable() { +async function checkIsUserVerifyingPlatformAuthenticatorAvailable() { try { const capabilities = await PublicKeyCredential.getClientCapabilities(); diff --git a/files/en-us/web/api/sanitizer/index.md b/files/en-us/web/api/sanitizer/index.md index 3509abeaab74317..355b2abebe5b48f 100644 --- a/files/en-us/web/api/sanitizer/index.md +++ b/files/en-us/web/api/sanitizer/index.md @@ -11,7 +11,7 @@ browser-compat: api.Sanitizer The **`Sanitizer`** interface of the [HTML Sanitizer API](/en-US/docs/Web/API/HTML_Sanitizer_API) defines a configuration object that specifies what elements, attributes and comments are allowed or should be removed when inserting strings of HTML into an {{domxref("Element")}} or {{domxref("ShadowRoot")}}, or when parsing an HTML string into a {{domxref("Document")}}. -A `Sanitizer` instance is effectively a wrapper around a {{domxref("SanitizerConfig")}}, and can be passed as a configuration alterative in the same [sanitization methods](/en-US/docs/Web/API/HTML_Sanitizer_API#sanitization_methods): +A `Sanitizer` instance is effectively a wrapper around a {{domxref("SanitizerConfig")}}, and can be passed as a configuration alternative in the same [sanitization methods](/en-US/docs/Web/API/HTML_Sanitizer_API#sanitization_methods): - {{domxref("Element/setHTML","setHTML()")}} or {{domxref("Element/setHTMLUnsafe","setHTMLUnsafe()")}} on {{domxref("Element")}}. - {{domxref("ShadowRoot/setHTML","setHTML()")}} or {{domxref("ShadowRoot/setHTMLUnsafe","setHTMLUnsafe()")}} on {{domxref("ShadowRoot")}}. diff --git a/files/en-us/web/api/vrpose/index.md b/files/en-us/web/api/vrpose/index.md index 3316a0be4a1b782..5d8dad47866e5d7 100644 --- a/files/en-us/web/api/vrpose/index.md +++ b/files/en-us/web/api/vrpose/index.md @@ -26,7 +26,7 @@ This interface is accessible through the {{domxref("VRDisplay.getPose()")}} and - {{domxref("VRPose.linearAcceleration")}} {{Deprecated_Inline}} {{ReadOnlyInline}} {{Non-standard_Inline}} - : Returns the linear acceleration of the {{domxref("VRDisplay")}} at the current {{domxref("VRFrameData.timestamp")}}, in meters per second per second. - {{domxref("VRPose.orientation")}} {{Deprecated_Inline}} {{ReadOnlyInline}} {{Non-standard_Inline}} - - : Returns the orientation of the sensor at the current {{domxref("VRFrameData.timestamp")}}, as a quarternion value. + - : Returns the orientation of the sensor at the current {{domxref("VRFrameData.timestamp")}}, as a quaternion value. - {{domxref("VRPose.angularVelocity")}} {{Deprecated_Inline}} {{ReadOnlyInline}} {{Non-standard_Inline}} - : Returns the angular velocity of the {{domxref("VRDisplay")}} at the current {{domxref("VRFrameData.timestamp")}}, in radians per second. - {{domxref("VRPose.angularAcceleration")}} {{Deprecated_Inline}} {{ReadOnlyInline}} {{Non-standard_Inline}} diff --git a/files/en-us/web/api/vrpose/orientation/index.md b/files/en-us/web/api/vrpose/orientation/index.md index 6dc62bab5792a81..bef38334b80f60e 100644 --- a/files/en-us/web/api/vrpose/orientation/index.md +++ b/files/en-us/web/api/vrpose/orientation/index.md @@ -11,7 +11,7 @@ browser-compat: api.VRPose.orientation {{APIRef("WebVR API")}}{{Deprecated_Header}}{{Non-standard_Header}} -The **`orientation`** read-only property of the {{domxref("VRPose")}} interface returns the orientation of the sensor at the current timestamp, as a quarternion value. +The **`orientation`** read-only property of the {{domxref("VRPose")}} interface returns the orientation of the sensor at the current timestamp, as a quaternion value. > [!NOTE] > This property was part of the old [WebVR API](https://immersive-web.github.io/webvr/spec/1.1/). It has been superseded by the [WebXR Device API](https://immersive-web.github.io/webxr/). diff --git a/files/en-us/web/http/reference/headers/permissions-policy/deferred-fetch/index.md b/files/en-us/web/http/reference/headers/permissions-policy/deferred-fetch/index.md index 5760c0f22acad73..2e6c1eb3be933b3 100644 --- a/files/en-us/web/http/reference/headers/permissions-policy/deferred-fetch/index.md +++ b/files/en-us/web/http/reference/headers/permissions-policy/deferred-fetch/index.md @@ -30,7 +30,7 @@ Permissions-policy: deferred-fetch=() A cross-origin subframe can grant `deferred-fetch` to one of its cross-origin subframe descendants, delegating its entire quota. This only works if none of the quota is currently being used. -Permissions Policy checks are not discernable from quota checks. Calling `fetchLater()` will throw a `QuotaExceededError` both if the quota is actually exceeded and if the quota was restricted for that origin via a Permissions Policy. +Permissions Policy checks are not discernible from quota checks. Calling `fetchLater()` will throw a `QuotaExceededError` both if the quota is actually exceeded and if the quota was restricted for that origin via a Permissions Policy. ## Default policy From aacd6e50f2e3d5c311d69649d9f2723577a464ec Mon Sep 17 00:00:00 2001 From: Joshua Chen Date: Thu, 14 Aug 2025 19:21:12 +0800 Subject: [PATCH 5/6] Provide more guidelines about labeling input (#40548) * Provide more guidelines about labeling input * Reviews * Apply suggestions from code review Co-authored-by: Estelle Weyl * Update files/en-us/web/html/reference/elements/label/index.md * Update index.md --------- Co-authored-by: Estelle Weyl --- .../html/reference/elements/label/index.md | 71 +++++++++++-------- 1 file changed, 43 insertions(+), 28 deletions(-) diff --git a/files/en-us/web/html/reference/elements/label/index.md b/files/en-us/web/html/reference/elements/label/index.md index 3fbe3afe1abac51..a2b57bb5adf3659 100644 --- a/files/en-us/web/html/reference/elements/label/index.md +++ b/files/en-us/web/html/reference/elements/label/index.md @@ -12,12 +12,12 @@ The **`