Skip to content

Commit

Permalink
Merge branch 'main' into shadowrootmode
Browse files Browse the repository at this point in the history
  • Loading branch information
pepelsbey authored Jan 25, 2024
2 parents 5a53fd0 + c45e210 commit 8a06253
Show file tree
Hide file tree
Showing 896 changed files with 5,570 additions and 1,736 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/on-demand-preview-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ jobs:

# See https://www.peterbe.com/plog/install-python-poetry-github-actions-faster
- name: Load cached ~/.local
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/.local
# the trailing number is used to increase for getting
Expand All @@ -123,7 +123,7 @@ jobs:

- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: yari/deployer/.venv
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}-${{ hashFiles('.github/workflows/pr-review-companion.yml') }}
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/pr-labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,7 @@ jobs:
l_max_size: "100"
xl_label: "size/xl"
fail_if_xl: "false"
# message_if_xl: >
# This PR exceeds the recommended size of 1000 lines.
# ...
message_if_xl: ""
files_to_ignore: |
"files/en-us/_redirects.txt"
"files/en-us/_wikihistory.json"
4 changes: 2 additions & 2 deletions .github/workflows/pr-review-companion.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:

# See https://www.peterbe.com/plog/install-python-poetry-github-actions-faster
- name: Load cached ~/.local
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/.local
# the trailing number is used to increase for getting
Expand All @@ -45,7 +45,7 @@ jobs:

- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: yari/deployer/.venv
# the trailing number is used to increase for getting
Expand Down
25 changes: 16 additions & 9 deletions files/en-us/_redirects.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5396,11 +5396,15 @@
/en-US/docs/Liberty!_Equality!_Validity! /en-US/docs/Learn/HTML/Introduction_to_HTML/Debugging_HTML
/en-US/docs/Link_prefetching_FAQ /en-US/docs/Glossary/Prefetch
/en-US/docs/Localization /en-US/docs/Glossary/Localization
/en-US/docs/MDC:How_to_Help /en-US/docs/MDN/Contribute
/en-US/docs/MDC:How_to_Help /en-US/docs/MDN/Community/Contributing
/en-US/docs/MDN/About /en-US/docs/MDN/Writing_guidelines
/en-US/docs/MDN/At_ten/Contributing_to_MDN /en-US/docs/MDN/Contribute
/en-US/docs/MDN/At_ten/Contributing_to_MDN /en-US/docs/MDN/Community/Contributing
/en-US/docs/MDN/Community/Issues/Issue_triage /en-US/docs/MDN/Community/Issues
/en-US/docs/MDN/Community/MDN_content /en-US/docs/MDN/Community/Contributing
/en-US/docs/MDN/Community/MDN_content/Issues /en-US/docs/MDN/Community/Issues
/en-US/docs/MDN/Community/MDN_content/Pull_requests /en-US/docs/MDN/Community/Pull_requests
/en-US/docs/MDN/Community/Users_teams /en-US/docs/MDN/Community/Roles_teams
/en-US/docs/MDN/Contribute /en-US/docs/MDN/Community/Contributing
/en-US/docs/MDN/Contribute/Changelog /en-US/docs/MDN/Changelog
/en-US/docs/MDN/Contribute/Code_sample_guidelines /en-US/docs/MDN/Writing_guidelines/Writing_style_guide/Code_style_guide
/en-US/docs/MDN/Contribute/Content /en-US/docs/MDN/Writing_guidelines
Expand All @@ -5416,9 +5420,9 @@
/en-US/docs/MDN/Contribute/Creating_and_editing_pages /en-US/docs/MDN/Writing_guidelines/Howto/Creating_moving_deleting
/en-US/docs/MDN/Contribute/Does_this_belong /en-US/docs/MDN/Writing_guidelines/What_we_write
/en-US/docs/MDN/Contribute/Editor/Live_samples /en-US/docs/MDN/Writing_guidelines/Page_structures/Live_samples
/en-US/docs/MDN/Contribute/FAQ /en-US/docs/MDN/Contribute
/en-US/docs/MDN/Contribute/FAQ /en-US/docs/MDN/Community/Contributing
/en-US/docs/MDN/Contribute/Feedback /en-US/docs/MDN/Community
/en-US/docs/MDN/Contribute/Fixing_MDN_content_bugs /en-US/docs/MDN/Community/MDN_content
/en-US/docs/MDN/Contribute/Fixing_MDN_content_bugs /en-US/docs/MDN/Community/Contributing
/en-US/docs/MDN/Contribute/Getting_started /en-US/docs/MDN/Community/Contributing/Getting_started
/en-US/docs/MDN/Contribute/GitHub_beginners /en-US/docs/MDN/Community/Contributing/Getting_started
/en-US/docs/MDN/Contribute/GitHub_best_practices /en-US/docs/MDN/Community/Issues
Expand Down Expand Up @@ -5450,7 +5454,7 @@
/en-US/docs/MDN/Contribute/Guidelines/Writing_style_guide /en-US/docs/MDN/Writing_guidelines/Writing_style_guide
/en-US/docs/MDN/Contribute/Help_beginners /en-US/docs/MDN/Community/Learn_forum
/en-US/docs/MDN/Contribute/How_to_document_a_CSS_property /en-US/docs/MDN/Writing_guidelines/Howto/Document_a_CSS_property
/en-US/docs/MDN/Contribute/Howto /en-US/docs/MDN/Contribute
/en-US/docs/MDN/Contribute/Howto /en-US/docs/MDN/Community/Contributing
/en-US/docs/MDN/Contribute/Howto/Add_or_update_browser_compatibility_data https://github.com/mdn/browser-compat-data/blob/main/docs/contributing.md
/en-US/docs/MDN/Contribute/Howto/Compatibility_tables /en-US/docs/MDN/Writing_guidelines/Page_structures/Compatibility_tables
/en-US/docs/MDN/Contribute/Howto/Convert_code_samples_to_be_live /en-US/docs/MDN/Writing_guidelines/Page_structures/Live_samples
Expand All @@ -5473,11 +5477,13 @@
/en-US/docs/MDN/Contribute/Localize /en-US/docs/MDN/Community/Contributing/Translated_content
/en-US/docs/MDN/Contribute/Markdown_in_MDN /en-US/docs/MDN/Writing_guidelines/Howto/Markdown_in_MDN
/en-US/docs/MDN/Contribute/Open_source_etiquette /en-US/docs/MDN/Community/Open_source_etiquette
/en-US/docs/MDN/Contribute/Processes /en-US/docs/MDN/Community/Contributing
/en-US/docs/MDN/Contribute/Processes/Content_bug_triage /en-US/docs/MDN/Community/Issues
/en-US/docs/MDN/Contribute/Processes/Locating_browser-specific_information https://github.com/mdn/browser-compat-data/blob/main/docs/matching-browser-releases/index.md
/en-US/docs/MDN/Contribute/Processes/Matching_features_to_browser_version https://github.com/mdn/browser-compat-data/blob/main/docs/matching-browser-releases/index.md
/en-US/docs/MDN/Contribute/Processes/Matching_features_to_browser_versiosn https://github.com/mdn/browser-compat-data/blob/main/docs/matching-browser-releases/index.md
/en-US/docs/MDN/Contribute/Processes/Short_surveys /en-US/docs/MDN/Contribute
/en-US/docs/MDN/Contribute/Processes/Short_surveys /en-US/docs/MDN/Community/Contributing
/en-US/docs/MDN/Contribute/Processes/Workstream_assessment_project /en-US/docs/MDN/Community/Contributing
/en-US/docs/MDN/Contribute/Sample_app_coding_guidelines /en-US/docs/MDN/Writing_guidelines/Writing_style_guide/Code_style_guide
/en-US/docs/MDN/Contribute/Sample_server /en-US/docs/MDN
/en-US/docs/MDN/Contribute/Structures /en-US/docs/MDN/Writing_guidelines/Page_structures
Expand Down Expand Up @@ -5601,7 +5607,7 @@
/en-US/docs/MDN/Writing_guidelines/What_we_write/Inclusion_criteria /en-US/docs/MDN/Writing_guidelines/What_we_write/Criteria_for_inclusion
/en-US/docs/MDN/Yari https://github.com/mdn/yari/tree/main/docs
/en-US/docs/MDN_at_ten /en-US/docs/MDN/At_ten
/en-US/docs/MDN_at_ten/Contributing_to_MDN /en-US/docs/MDN/Contribute
/en-US/docs/MDN_at_ten/Contributing_to_MDN /en-US/docs/MDN/Community/Contributing
/en-US/docs/MDN_at_ten/History /en-US/docs/MDN/At_ten/History_of_MDN
/en-US/docs/MDN_at_ten/History_of_MDN /en-US/docs/MDN/At_ten/History_of_MDN
/en-US/docs/Main_page /en-US/
Expand Down Expand Up @@ -8611,6 +8617,7 @@
/en-US/docs/Web/API/Headers/getAll /en-US/docs/Web/API/Headers/get
/en-US/docs/Web/API/History.length /en-US/docs/Web/API/History/length
/en-US/docs/Web/API/History_API/Example /en-US/docs/Web/API/History_API/Working_with_the_History_API
/en-US/docs/Web/API/Houdini /en-US/docs/Web/API/Houdini_APIs
/en-US/docs/Web/API/IDBCursor.advance /en-US/docs/Web/API/IDBCursor/advance
/en-US/docs/Web/API/IDBCursor.continue /en-US/docs/Web/API/IDBCursor/continue
/en-US/docs/Web/API/IDBCursor.delete /en-US/docs/Web/API/IDBCursor/delete
Expand Down Expand Up @@ -12156,7 +12163,7 @@
/en-US/docs/Web/Guide/HTML/Using_HTML_sections_and_outlines /en-US/docs/Web/HTML/Element/Heading_Elements
/en-US/docs/Web/Guide/HTML/Using_data_attributes /en-US/docs/Learn/HTML/Howto/Use_data_attributes
/en-US/docs/Web/Guide/HTML/XHTML /en-US/docs/Glossary/XHTML
/en-US/docs/Web/Guide/Houdini /en-US/docs/Web/API/Houdini
/en-US/docs/Web/Guide/Houdini /en-US/docs/Web/API/Houdini_APIs
/en-US/docs/Web/Guide/Index /en-US/docs/Web/Guide
/en-US/docs/Web/Guide/Introduction_to_Web_development /en-US/docs/Learn
/en-US/docs/Web/Guide/Mobile /en-US/docs/Learn/CSS/CSS_layout/Responsive_Design
Expand Down Expand Up @@ -12336,7 +12343,7 @@
/en-US/docs/Web/HTTP/X-Frame-Options /en-US/docs/Web/HTTP/Headers/X-Frame-Options
/en-US/docs/Web/HTTP/data_URIs /en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URLs
/en-US/docs/Web/HTTP/www_and_non-www_URLs /en-US/docs/Web/HTTP/Basics_of_HTTP/Choosing_between_www_and_non-www_URLs
/en-US/docs/Web/Houdini /en-US/docs/Web/API/Houdini
/en-US/docs/Web/Houdini /en-US/docs/Web/API/Houdini_APIs
/en-US/docs/Web/Houdini/CSS_Painting_API /en-US/docs/Web/API/CSS_Painting_API/Guide
/en-US/docs/Web/Houdini/CSS_Typed_OM /en-US/docs/Web/API/CSS_Typed_OM_API
/en-US/docs/Web/Houdini/Learn/CSS_Painting_API /en-US/docs/Web/API/CSS_Painting_API/Guide
Expand Down
39 changes: 1 addition & 38 deletions files/en-us/_wikihistory.json
Original file line number Diff line number Diff line change
Expand Up @@ -11697,43 +11697,6 @@
"groovecoder"
]
},
"MDN/Contribute": {
"modified": "2020-12-14T09:31:17.213Z",
"contributors": [
"sourabhramsingh",
"maxTarlov",
"chrisdavidmills",
"aditibasu",
"wbamberg",
"SphinxKnight",
"shwetabhsuman",
"jswisher",
"wdot789",
"fotografi",
"Sheppy",
"vikash111",
"Kerstomaat",
"ertogrul",
"elwakil",
"Thomskii",
"Lasantha",
"jsx",
"saifulislam1",
"adi28galaxyak",
"Volluta",
"Husaria",
"klez",
"pytseng",
"alispivak",
"utente-pc",
"emmanuelodenyire",
"Mars"
]
},
"MDN/Contribute/Processes": {
"modified": "2020-09-30T15:17:09.733Z",
"contributors": ["wbamberg", "david_ross", "jswisher", "Sheppy"]
},
"MDN/MDN_Product_Advisory_Board": {
"modified": "2019-06-05T12:41:23.682Z",
"contributors": [
Expand Down Expand Up @@ -42340,7 +42303,7 @@
"modified": "2019-03-18T20:56:26.488Z",
"contributors": ["wbamberg", "chrisdavidmills", "rugk"]
},
"Web/API/Houdini": {
"Web/API/Houdini_APIs": {
"modified": "2020-07-16T03:51:08.991Z",
"contributors": [
"Wind1808",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,19 +86,19 @@ As you can see we're using the {{domxref("CanvasRenderingContext2D.beginPath()",
- start angle and end angle (what angle to start and finish drawing the circle, in radians)
- direction of drawing (`false` for clockwise, the default, or `true` for anti-clockwise.) This last parameter is optional.

The {{domxref("CanvasRenderingContext2D.fillStyle","fillStyle")}} property looks different than before. This is because, just as with CSS, color can be specified as a hexadecimal value, a color keyword, the `rgba()` function, or any of the other available color methods.
The {{domxref("CanvasRenderingContext2D.fillStyle","fillStyle")}} property looks different than before. This is because, just as with CSS, color can be specified as a hexadecimal value, a color keyword, the `rgb()` function, or any of the other available color methods.

Instead of using {{domxref("CanvasRenderingContext2D.fill()","fill()")}} and filling the shapes with colors, we can use {{domxref("CanvasRenderingContext2D.stroke()","stroke()")}} to only color the outer stroke. Try adding this code to your JavaScript too:

```js
ctx.beginPath();
ctx.rect(160, 10, 100, 40);
ctx.strokeStyle = "rgba(0, 0, 255, 0.5)";
ctx.strokeStyle = "rgb(0 0 255 / 50%)";
ctx.stroke();
ctx.closePath();
```

The code above prints a blue-stroked empty rectangle. Thanks to the alpha channel in the `rgba()` function, the blue color is semi transparent.
The code above prints a blue-stroked empty rectangle. Thanks to the alpha channel in the `rgb()` function, the blue color is semi transparent.

## Compare your code

Expand Down
27 changes: 27 additions & 0 deletions files/en-us/glossary/accessible_description/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
title: Accessible description
slug: Glossary/Accessible_description
page-type: glossary-definition
---

{{GlossarySidebar}}

An **accessible description** is the description of a user interface element that provides additional information to help users of assistive technology understand the UI element and its context. It is a text description associated with an HTML element that provides users of assistive technology with a description for the element beyond what is provided by the element's {{glossary("accessible name")}}.

An element's accessible description is part of the {{glossary("accessibility tree")}} that makes web content available to {{glossary("Screen_reader", "screen readers")}} and other assistive technologies, which, in turn, make that content available to the users of those technologies.

The accessible description for a {{htmlelement("table")}} is its first {{htmlelement("caption")}}, for the {{htmlelement("figure")}}, is the {{htmlelement("figcaption")}}, for the {{htmlelement("summary")}}, is the content of the {{htmlelement("details")}} it is nested in, and for the button {{htmlelement("input")}} elements, it is the `value` attribute's value, unless the element also has a `aria-describedby` or `aria-description` attribute, which takes precedence.

For other elements, the description needs to be programmatically associated with the related element. In these cases, the accessible description is provided by the [`aria-describedby`](/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-describedby) attribute, [`aria-description`](/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-description) attribute, or the [`title`](/en-US/docs/Web/HTML/Global_attributes#title) attribute, if the `title` would not otherwise also be the {{glossary("accessible name")}} for that element, in that order of precedence.

Descriptions are reduced to text strings. For example, if an element's `aria-describedby` attribute value is the `id` of an HTML {{htmlelement("img")}}, the description is the description of the image (usually the image's `alt` attribute).

You can inspect the accessible description for any element on your page: look at your browser's developer tools' accessibility tab, which provides the accessibility information for the currently selected element.

## See also

- {{glossary("accessible name")}} glossary term
- [ARIA roles](/en-US/docs/Web/Accessibility/ARIA/Roles)
- [ARIA attribute](/en-US/docs/Web/Accessibility/ARIA/Attributes)
- [Accessibility](/en-US/docs/Web/Accessibility)
- [Learn accessibility](/en-US/docs/Learn/Accessibility)
2 changes: 1 addition & 1 deletion files/en-us/glossary/alpha/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ page-type: glossary-definition

The **alpha channel** specifies to opacity of a ({{CSSxRef("<color>")}}). Colors are represented in digital form as a collection of numbers, each representing the strength or intensity level of a given component of the color. Each of these components is called a **channel**. In a typical image file, the color channels describe how much red, green, and blue are used to make up the final color. To represent a color through which the background can be seen to some extent, a fourth channel is added to the color: the alpha channel.

For example, the color `#8921F2` (also described as `rgb(137 33 242)` or `hsl(270 89% 54)`) is a nice shade of purple. Below you see a small box of that color in the top-left corner and a box of the _same_ color but with an alpha channel set at 0.5 (50% opacity), `#8921F280`, where `80` is the hexadecimal equivalent of 50%. This color is also described as `rgb(137 33 242 / 0.5)` or `hsl(270 89% 54 / 0.5)`. The two boxes are drawn on top of a paragraph of text.
For example, the color `#8921F2` (also described as `rgb(137 33 242)` or `hsl(270 89% 54)`) is a nice shade of purple. Below you see a small box of that color in the top-left corner and a box of the _same_ color but with an alpha channel set at 50% (or 0.5) opacity, `#8921F280`, where `80` is the hexadecimal equivalent of 50%. This color is also described as `rgb(137 33 242 / 50%)` or `hsl(270 89% 54 / 50%)`. The two boxes are drawn on top of a paragraph of text.

![Image showing the effect of an alpha channel on a color.](alpha-channel-example.png)

Expand Down
16 changes: 8 additions & 8 deletions files/en-us/glossary/cacheable/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ page-type: glossary-definition

{{GlossarySidebar}}

A **cacheable** response is an HTTP response that can be cached, that is stored to be retrieved and used later, saving a new request to the server. Not all HTTP responses can be cached, these are the following constraints for an HTTP response to be cached:
A **cacheable** response is an HTTP response that can be cached, that is stored to be retrieved and used later, saving a new request to the server. Not all HTTP responses can be cached; these are the constraints for an HTTP response to be cacheable:

- The method used in the request is itself _cacheable_, that is either a {{HTTPMethod("GET")}} or a {{HTTPMethod("HEAD")}} method. A response to a {{HTTPMethod("POST")}} or {{HTTPMethod("PATCH")}} request can also be cached if freshness is indicated and the {{HTTPHeader("Content-Location")}} header is set, but this is rarely implemented. For example, Firefox does not support it ([Firefox bug 109553](https://bugzil.la/109553)). Other methods, like {{HTTPMethod("PUT")}} or {{HTTPMethod("DELETE")}} are not cacheable and their result cannot be cached.
- The status code of the response is _known_ by the application caching, and it is considered _cacheable_. The following status code are cacheable: {{HTTPStatus("200")}}, {{HTTPStatus("203")}}, {{HTTPStatus("204")}}, {{HTTPStatus("206")}}, {{HTTPStatus("300")}}, {{HTTPStatus("301")}}, {{HTTPStatus("404")}}, {{HTTPStatus("405")}}, {{HTTPStatus("410")}}, {{HTTPStatus("414")}}, and {{HTTPStatus("501")}}.
- There are _specific headers_ in the response, like {{HTTPHeader("Cache-Control")}}, that prevents caching.
- The method used in the request is _cacheable_, that is either a {{HTTPMethod("GET")}} or a {{HTTPMethod("HEAD")}} method. A response to a {{HTTPMethod("POST")}} or {{HTTPMethod("PATCH")}} request can also be cached if freshness is indicated and the {{HTTPHeader("Content-Location")}} header is set, but this is rarely implemented. For example, Firefox does not support it ([Firefox bug 109553](https://bugzil.la/109553)). Other methods, like {{HTTPMethod("PUT")}} or {{HTTPMethod("DELETE")}} are not cacheable and their result cannot be cached.
- The status code of the response is _known_ by the application caching, and is _cacheable_. The following status codes are cacheable: {{HTTPStatus("200")}}, {{HTTPStatus("203")}}, {{HTTPStatus("204")}}, {{HTTPStatus("206")}}, {{HTTPStatus("300")}}, {{HTTPStatus("301")}}, {{HTTPStatus("404")}}, {{HTTPStatus("405")}}, {{HTTPStatus("410")}}, {{HTTPStatus("414")}}, and {{HTTPStatus("501")}}.
- There are no specific headers in the response, like {{HTTPHeader("Cache-Control")}}, with values that would prohibit caching.

Note that some non-cacheable requests/responses to a specific URI may invalidate previously cached responses on the same URI. For example, a {{HTTPMethod("PUT")}} to pageX.html will invalidate all cached {{HTTPMethod("GET")}} or {{HTTPMethod("HEAD")}} requests to the same URI.
Note that some requests with non-cacheable responses to a specific URI may invalidate previously cached responses from the same URI. For example, a {{HTTPMethod("PUT")}} to `/pageX.html` will invalidate all cached responses to {{HTTPMethod("GET")}} or {{HTTPMethod("HEAD")}} requests to `/pageX.html`.

When both, the method of the request and the status of the response, are cacheable, the response to the request can be cached:
When both the method of the request and the status of the response are cacheable, the response to the request can be cached:

```http
GET /pageX.html HTTP/1.1
Expand All @@ -24,7 +24,7 @@ GET /pageX.html HTTP/1.1
(…)
```

A {{HTTPMethod("PUT")}} request cannot be cached. Moreover, it invalidates cached data for request to the same URI done via {{HTTPMethod("HEAD")}} or {{HTTPMethod("GET")}}:
The response to a {{HTTPMethod("PUT")}} request cannot be cached. Moreover, it invalidates cached data for requests to the same URI using {{HTTPMethod("HEAD")}} or {{HTTPMethod("GET")}} methods:

```http
PUT /pageX.html HTTP/1.1
Expand All @@ -34,7 +34,7 @@ PUT /pageX.html HTTP/1.1
(…)
```

A specific {{HTTPHeader("Cache-Control")}} header in the response can prevent caching:
The presence of the {{HTTPHeader("Cache-Control")}} header with a particular value in the response can prevent caching:

```http
GET /pageX.html HTTP/1.1
Expand Down
Loading

0 comments on commit 8a06253

Please sign in to comment.