Skip to content

Commit e706cac

Browse files
committed
Merge branch 'main' into async
2 parents 6c6233f + 58baf80 commit e706cac

File tree

11 files changed

+34
-17
lines changed

11 files changed

+34
-17
lines changed

.changeset/cuddly-humans-end.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'svelte': patch
3+
---
4+
5+
fix: silence autofocus a11y warning inside `<dialog>`

.changeset/eight-walls-mate.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

.changeset/new-candles-marry.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

.changeset/tiny-news-whisper.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'svelte': patch
3+
---
4+
5+
chore: replace inline regex with variable

documentation/docs/02-runes/02-$state.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ todos.push({
5050
});
5151
```
5252

53-
> [!NOTE] When you update properties of proxies, the original object is _not_ mutated.
53+
> [!NOTE] When you update properties of proxies, the original object is _not_ mutated. If you desire to use your own proxy handlers in a state proxy, [you should wrap the object _after_ wrapping it in `$state`](https://svelte.dev/playground/hello-world?version=latest#H4sIAAAAAAAACpWR3WoDIRCFX2UqhWyIJL3erAulL9C7XnQLMe5ksbUqOpsfln33YuyGFNJC8UKdc2bOhw7Myk9kJXsJ0nttO9jcR5KEG9AWJDwHdzwxznbaYGTl68Do5JM_FRifuh-9X8Y9Gkq1rYx4q66cJbQUWcmqqIL2VDe2IYMEbvuOikBADi-GJDSkXG-phId0G-frye2DO2psQYDFQ0Ys8gQO350dUkEydEg82T0GOs0nsSG9g2IqgxACZueo2ZUlpdvoDC6N64qsg1QKY8T2bpZp8gpIfbCQ85Zn50Ud82HkeY83uDjspenxv3jXcSDyjPWf9L1vJf0GH666J-jLu1ery4dV257IWXBWGa0-xFDMQdTTn2ScxWKsn86ROsLwQxqrVR5QM84Ij8TKFD2-cUZSm4O2LSt30kQcvwCgCmfZnAIAAA==).
5454
5555
Note that if you destructure a reactive value, the references are not reactive — as in normal JavaScript, they are evaluated at the point of destructuring:
5656

packages/svelte/CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# svelte
22

3+
## 5.35.6
4+
5+
### Patch Changes
6+
7+
- chore: simplify reaction/source ownership tracking ([#16333](https://github.com/sveltejs/svelte/pull/16333))
8+
9+
- chore: simplify internal component `pop()` ([#16331](https://github.com/sveltejs/svelte/pull/16331))
10+
311
## 5.35.5
412

513
### Patch Changes

packages/svelte/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "svelte",
33
"description": "Cybernetically enhanced web apps",
44
"license": "MIT",
5-
"version": "5.35.5",
5+
"version": "5.35.6",
66
"type": "module",
77
"types": "./types/index.d.ts",
88
"engines": {

packages/svelte/src/compiler/phases/2-analyze/visitors/shared/a11y.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ import { roles as roles_map, aria, elementRoles } from 'aria-query';
66
import { AXObjects, AXObjectRoles, elementAXObjects } from 'axobject-query';
77
import {
88
regex_heading_tags,
9+
regex_js_prefix,
910
regex_not_whitespace,
11+
regex_redundant_img_alt,
1012
regex_starts_with_vowel,
1113
regex_whitespaces
1214
} from '../../../patterns.js';
@@ -875,7 +877,7 @@ export function check_element(node, context) {
875877
}
876878

877879
// no-autofocus
878-
if (name === 'autofocus') {
880+
if (name === 'autofocus' && node.name !== 'dialog' && !is_parent(context.path, ['dialog'])) {
879881
w.a11y_autofocus(attribute);
880882
}
881883

@@ -1011,7 +1013,7 @@ export function check_element(node, context) {
10111013
if (href) {
10121014
const href_value = get_static_text_value(href);
10131015
if (href_value !== null) {
1014-
if (href_value === '' || href_value === '#' || /^\W*javascript:/i.test(href_value)) {
1016+
if (href_value === '' || href_value === '#' || regex_js_prefix.test(href_value)) {
10151017
w.a11y_invalid_attribute(href, href_value, href.name);
10161018
}
10171019
}
@@ -1061,7 +1063,7 @@ export function check_element(node, context) {
10611063
const alt_attribute = get_static_text_value(attribute_map.get('alt'));
10621064
const aria_hidden = get_static_value(attribute_map.get('aria-hidden'));
10631065
if (alt_attribute && !aria_hidden && !has_spread) {
1064-
if (/\b(image|picture|photo)\b/i.test(alt_attribute)) {
1066+
if (regex_redundant_img_alt.test(alt_attribute)) {
10651067
w.a11y_img_redundant_alt(node);
10661068
}
10671069
}

packages/svelte/src/compiler/phases/patterns.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,5 @@ export const regex_heading_tags = /^h[1-6]$/;
2323
export const regex_illegal_attribute_character = /(^[0-9-.])|[\^$@%&#?!|()[\]{}^*+~;]/;
2424
export const regex_bidirectional_control_characters =
2525
/[\u202a\u202b\u202c\u202d\u202e\u2066\u2067\u2068\u2069]+/g;
26+
export const regex_js_prefix = /^\W*javascript:/i;
27+
export const regex_redundant_img_alt = /\b(image|picture|photo)\b/i;

packages/svelte/src/version.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@
44
* The current version, as set in package.json.
55
* @type {string}
66
*/
7-
export const VERSION = '5.35.5';
7+
export const VERSION = '5.35.6';
88
export const PUBLIC_VERSION = '5';

0 commit comments

Comments
 (0)