From e81e5244cf42b38b2dec0b9ca017e843adbf3d16 Mon Sep 17 00:00:00 2001 From: Khushal Sagar <63884798+khushalsagar@users.noreply.github.com> Date: Wed, 8 Nov 2023 16:02:15 -0500 Subject: [PATCH] Update spec for resolved issues Fixes https://github.com/w3c/csswg-drafts/issues/9365, https://github.com/w3c/csswg-drafts/issues/9358 and https://github.com/w3c/csswg-drafts/issues/9276. --- css-view-transitions-1/Overview.bs | 43 ++++++++++++++++++++++++++++-- 1 file changed, 41 insertions(+), 2 deletions(-) diff --git a/css-view-transitions-1/Overview.bs b/css-view-transitions-1/Overview.bs index bd76986ebeb..c49888eb514 100644 --- a/css-view-transitions-1/Overview.bs +++ b/css-view-transitions-1/Overview.bs @@ -595,6 +595,8 @@ urlPrefix: https://wicg.github.io/navigation-api/; type: interface; All of the [=view transition pseudo-elements=] are selected from their [=ultimate originating element=], the [=document element=]. + The [=view transition tree=] is not exposed to the accessibility tree. +
For example, the ''::view-transition-group()'' pseudo-element is attached to the root element selector directly, @@ -809,7 +811,17 @@ urlPrefix: https://wicg.github.io/navigation-api/; type: interface; Therefore, the [=view transition layer=] is a sibling of all other content. When a {{Document}}'s [=document/active view transition=]'s [=ViewTransition/phase=] is "`animating`", - the boxes generated by any element in that {{Document}} with [=captured in a view transition=] are [=invisible=]. + the boxes generated by any element in that {{Document}} with [=captured in a view transition=] + and its [=element contents=], + except [=ViewTransition/transition root pseudo-element=]'s [=tree/inclusive descendants=], + are not painted (as if they had ''visibility: hidden'') and + do not respond to hit-testing (as if they had ''pointer-events: none''). + + Note: Elements participating in a transition need to skip painting in their DOM location because + their image is painted in the corresponding ''::view-transition-new()'' pseudo-element instead. + Similarly, hit-testing is skipped because the element's DOM location does not correspond to where its contents are rendered. + However, there is no change in how these elements are accessed by assistive technologies or the accessibility tree. + # User Agent Stylesheet # {#ua-styles} @@ -1165,6 +1177,12 @@ urlPrefix: https://wicg.github.io/navigation-api/; type: interface; : old mix-blend-mode :: Null or a 'mix-blend-mode', initially null. + : old backdrop-filter + :: Null or a 'backdrop-filter', initially null. + + : old color-scheme + :: Null or a 'color-scheme', initially null. + : new element :: an [=/element=] or null. Initially null. @@ -1378,6 +1396,10 @@ urlPrefix: https://wicg.github.io/navigation-api/; type: interface; 1. Set |capture|'s [=captured element/old mix-blend-mode=] to the [=computed value=] of 'mix-blend-mode' on |element|. + 1. Set |capture|'s [=captured element/old backdrop-filter=] to the [=computed value=] of 'backdrop-filter' on |element|. + + 1. Set |capture|'s [=captured element/old color-scheme=] to the [=computed value=] of 'color-scheme' on |element|. + 1. Let |transitionName| be the [=computed value=] of 'view-transition-name' for |element|. 1. Set |namedElements|[|transitionName|] to |capture|. @@ -1503,6 +1525,8 @@ urlPrefix: https://wicg.github.io/navigation-api/; type: interface; 1. Let |height| be |capturedElement|'s [=captured element/old height=]. + 1. Let |backdropFilter| be |capturedElement|'s [=captured element/old backdrop-filter=]. + 1. Set |capturedElement|'s [=captured element/group keyframes=] to a new {{CSSKeyframesRule}} representing the following CSS, and append it to |document|'s [=document/dynamic view transition style sheet=]: @@ -1513,6 +1537,7 @@ urlPrefix: https://wicg.github.io/navigation-api/; type: interface; transform: transform; width: width; height: height; + backdrop-filter: backdropFilter; } } @@ -1763,7 +1788,7 @@ urlPrefix: https://wicg.github.io/navigation-api/; type: interface; 1. [=map/For each=] |transitionName| → |capturedElement| of |transition|'s [=ViewTransition/named elements=]: - 1. Let |width|, |height|, |transform|, |writingMode|, |direction|, |textOrientation| and |mixBlendMode| be null. + 1. Let |width|, |height|, |transform|, |writingMode|, |direction|, |textOrientation|, |mixBlendMode|, |backdropFilter| and |colorScheme| be null. 1. If |capturedElement|'s [=new element=] is null, then: @@ -1781,6 +1806,10 @@ urlPrefix: https://wicg.github.io/navigation-api/; type: interface; 1. Set |mixBlendMode| to |capturedElement|'s [=captured element/old mix-blend-mode=]. + 1. Set |backdropFilter| to |capturedElement|'s [=captured element/old backdrop-filter=]. + + 1. Set |colorScheme| to |capturedElement|'s [=captured element/old color-scheme=]. + 1. Otherwise: 1. Return failure if any of the following conditions is true: @@ -1806,6 +1835,10 @@ urlPrefix: https://wicg.github.io/navigation-api/; type: interface; 1. Set |mixBlendMode| to the [=computed value=] of 'mix-blend-mode' on |capturedElement|'s [=new element=]. + 1. Set |backdropFilter| to the [=computed value=] of 'backdrop-filter' on |capturedElement|'s [=new element=]. + + 1. Set |colorScheme| to the [=computed value=] of 'color-scheme' on |capturedElement|'s [=new element=]. + 1. If |capturedElement|'s [=captured element/group styles rule=] is null, then set |capturedElement|'s [=captured element/group styles rule=] to a new {{CSSStyleRule}} representing the following CSS, and append it to |transition|'s [=relevant global object's=] [=associated document=]'s [=document/dynamic view transition style sheet=]. @@ -1822,6 +1855,8 @@ urlPrefix: https://wicg.github.io/navigation-api/; type: interface; direction: direction; text-orientation: textOrientation; mix-blend-mode: mixBlendMode; + backdrop-filter: backdropFilter; + color-scheme: colorScheme; } @@ -1885,6 +1920,10 @@ Changes from issue 8230. * Refactor the old capture algorithm to properly set [=captured in a view transition=] before reading the value. * Make the {{Document/startViewTransition()}} parameter non-nullable. See issue 9460. +* Elements participating in a [=view transition=] are exposed to accessibility tree. See issue 9365. +* The [=view transition tree=] is not exposed to accessibility tree. See issue 9365. +* Animate back-drop filter similar to transform/size. See issue 9358. +* Copy `color-scheme` from DOM element to ''::view-transition-group()''. See issue 9276.

Changes from 2022-05-25 Working Draft