Merge branch 'main' into fix/select-multiple-dynamic

pull/17306/head
Uzair-Ahmed-Shah 8 months ago committed by GitHub
commit 94fe55c63f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -1,5 +1,13 @@
# svelte
## 5.45.6
### Patch Changes
- fix: don't issue a11y warning for `<video>` without captions if it has no `src` ([#17311](https://github.com/sveltejs/svelte/pull/17311))
- fix: add `srcObject` to permitted `<audio>`/`<video>` attributes ([#17310](https://github.com/sveltejs/svelte/pull/17310))
## 5.45.5
### Patch Changes

@ -1239,6 +1239,7 @@ export interface HTMLMediaAttributes<T extends HTMLMediaElement> extends HTMLAtt
playsinline?: boolean | undefined | null;
preload?: 'auto' | 'none' | 'metadata' | '' | undefined | null;
src?: string | undefined | null;
srcobject?: MediaStream | MediaSource | File | Blob;
/**
* a value between 0 and 1
*/

@ -2,7 +2,7 @@
"name": "svelte",
"description": "Cybernetically enhanced web apps",
"license": "MIT",
"version": "5.45.5",
"version": "5.45.6",
"type": "module",
"types": "./types/index.d.ts",
"engines": {

@ -486,9 +486,17 @@ export function check_element(node, context) {
case 'video': {
const aria_hidden_attribute = attribute_map.get('aria-hidden');
const aria_hidden_exist = aria_hidden_attribute && get_static_value(aria_hidden_attribute);
if (attribute_map.has('muted') || aria_hidden_exist === 'true' || has_spread) {
return;
}
if (!attribute_map.has('src')) {
// don't warn about missing captions if `<video>` has no `src` —
// could e.g. be playing a MediaStream
return;
}
let has_caption = false;
const track = /** @type {AST.RegularElement | undefined} */ (
node.fragment.nodes.find((i) => i.type === 'RegularElement' && i.name === 'track')

@ -4,5 +4,5 @@
* The current version, as set in package.json.
* @type {string}
*/
export const VERSION = '5.45.5';
export const VERSION = '5.45.6';
export const PUBLIC_VERSION = '5';

@ -1,6 +1,7 @@
<video><track kind="captions"/></video>
<video></video>
<video><track /></video>
<video src="x"><track kind="captions"/></video>
<video src="x"></video>
<video src="x"><track /></video>
<audio></audio>
<video aria-hidden="true"></video>
<video aria-hidden="false"></video>
<video src="x" aria-hidden="true"></video>
<video src="x" aria-hidden="false"></video>
<video></video> <!-- no src -->

@ -2,7 +2,7 @@
{
"code": "a11y_media_has_caption",
"end": {
"column": 15,
"column": 23,
"line": 2
},
"message": "`<video>` elements must have a `<track kind=\"captions\">`",
@ -14,7 +14,7 @@
{
"code": "a11y_media_has_caption",
"end": {
"column": 24,
"column": 32,
"line": 3
},
"message": "`<video>` elements must have a `<track kind=\"captions\">`",
@ -26,7 +26,7 @@
{
"code": "a11y_media_has_caption",
"end": {
"column": 35,
"column": 43,
"line": 6
},
"message": "`<video>` elements must have a `<track kind=\"captions\">`",

Loading…
Cancel
Save