From ce18785038966c8b29702f1a79b5a1c46a8b24c4 Mon Sep 17 00:00:00 2001 From: Keith Cirkel Date: Fri, 8 Dec 2023 14:15:42 +0000 Subject: [PATCH 1/9] Editorial: tidy up hidden enumerated attribute Helps with #9832 --- source | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/source b/source index e20b576fe78..887191b0152 100644 --- a/source +++ b/source @@ -77527,21 +77527,25 @@ END:VCARD

All HTML elements may have the hidden content attribute set. The hidden attribute is an enumerated attribute. The - following table lists the states for this attribute:

+ data-x="attr-hidden">hidden attribute is an enumerated attribute with the + following keywords and states:

- - -
State Keywords + State + Brief description
Until found state until-found + Until found state + Will not be rendered but content inside will be accessible to find-in-page and + fragment navigation
Hidden state The empty string + Hidden state + Will not be rendered.
hidden
From 9ceb0822982fd5e6e4bc01143390a47664b00fc6 Mon Sep 17 00:00:00 2001 From: Keith Cirkel Date: Fri, 8 Dec 2023 16:19:44 +0000 Subject: [PATCH 2/9] s/Keywords/Keyword --- source | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source b/source index 887191b0152..1c17ab052fa 100644 --- a/source +++ b/source @@ -77533,7 +77533,7 @@ END:VCARD - From af803ae5f5ae7c432d2d01b79d9cc6de89910d76 Mon Sep 17 00:00:00 2001 From: Keith Cirkel Date: Fri, 8 Dec 2023 16:19:57 +0000 Subject: [PATCH 3/9] drop `-keyword` suffix --- source | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/source b/source index 1c17ab052fa..16749329364 100644 --- a/source +++ b/source @@ -77538,7 +77538,7 @@ END:VCARD - -
Keywords + Keyword State Brief description
Brief description
until-found + until-found Until found state Will not be rendered but content inside will be accessible to find-in-page and fragment navigation @@ -77547,7 +77547,7 @@ END:VCARD Hidden state Will not be rendered.
hidden + hidden

The attribute's missing value default is the

  1. If the hidden attribute is in the until-found state, then return "until-found".

  2. + data-x="attr-hidden-until-found">until-found".

  3. If the hidden attribute is set, then return true.

  4. @@ -77701,9 +77701,9 @@ END:VCARD
    1. If the given value is a string that is an ASCII case-insensitive match for - "until-found", then set the until-found", then set the hidden attribute to "until-found".

    2. + data-x="attr-hidden-until-found">until-found".

    3. Otherwise, if the given value is false, then remove the hidden attribute.

    4. @@ -137776,7 +137776,7 @@ interface External { hidden HTML elements Whether the element is relevant - "until-found"; + "until-found"; "hidden"; the empty string From 0e21a7d844768ebe13860c6064f0db2a311e03ab Mon Sep 17 00:00:00 2001 From: Keith Cirkel Date: Mon, 11 Dec 2023 10:18:48 +0000 Subject: [PATCH 4/9] drop state suffix --- source | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source b/source index 16749329364..07cb9896f6c 100644 --- a/source +++ b/source @@ -77539,12 +77539,12 @@ END:VCARD until-found - Until found state + Until found Will not be rendered but content inside will be accessible to find-in-page and fragment navigation The empty string - Hidden state + Hidden Will not be rendered. hidden From 2423ee8a0bb7898f75f96d312b011d37ad986874 Mon Sep 17 00:00:00 2001 From: Keith Cirkel Date: Mon, 11 Dec 2023 11:16:42 +0000 Subject: [PATCH 5/9] move state word outside of state links --- source | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/source b/source index 07cb9896f6c..35142399421 100644 --- a/source +++ b/source @@ -77539,34 +77539,34 @@ END:VCARD until-found - Until found + until found Will not be rendered but content inside will be accessible to find-in-page and fragment navigation The empty string - Hidden + hidden Will not be rendered. hidden

      The attribute's missing value default is the not hidden state, and its not hidden state, and its invalid value default is the hidden state.

      When an element has the hidden attribute in the hidden state, it indicates that the element is not yet, or + data-x="attr-hidden-hidden-state">hidden state, it indicates that the element is not yet, or is no longer, directly relevant to the page's current state, or that it is being used to declare content to be reused by other parts of the page as opposed to being directly accessed by the user. User agents should not render elements that are in the hidden state. This requirement may be implemented + data-x="attr-hidden-hidden-state">hidden state. This requirement may be implemented indirectly through the style layer. For example, a web browser could implement these requirements using the rules suggested in the Rendering section.

      When an element has the hidden attribute in the hidden until found state, it indicates that the - element is hidden like the hidden state but the + data-x="attr-hidden-until-found-state">hidden until found state, it indicates that the + element is hidden like the hidden state but the content inside the element will be accessible to find-in-page and fragment navigation. When these features attempt to scroll to a target which is in the element's subtree, the user agent will remove the

      Web browsers will use 'content-visibility: hidden' instead of 'display: none' when the hidden attribute is in the hidden until found state, as specified in the hidden until found state, as specified in the Rendering section.

      @@ -77587,25 +77587,25 @@ END:VCARD effects of the hidden state. Authors therefore have to take care when writing their style sheets to make sure that the attribute is still styled as expected. In addition, legacy user agents which don't support the hidden until found state will have 'display: none' + data-x="attr-hidden-until-found-state">hidden until found state will have 'display: none' instead of 'content-visibility: hidden', so authors are encouraged to make sure that their style sheets don't change the 'display' or 'content-visibility' properties of hidden until found elements.

      Since elements with the hidden attribute in the hidden until found state use 'content-visibility: + data-x="attr-hidden-until-found-state">hidden until found state use 'content-visibility: hidden' instead of 'display: none', there are two caveats of the hidden until found state that make it different - from the hidden state:

      + data-x="attr-hidden-until-found-state">hidden until found state that make it different + from the hidden state:

      1. The element needs to be affected by layout containment in order to be revealed by find-in-page. This means that if the element in the hidden until found state has a 'display' value of + data-x="attr-hidden-until-found-state">hidden until found state has a 'display' value of 'none', 'contents', or 'inline', then the element will not be revealed by find-in-page.

      2. The element will still have a generated box when in - the hidden until found state, which means + the hidden until found state, which means that borders, margin, and padding will still be rendered around the element.

      From a8b283520020be16900b7cfb2cf44f7dd0235cfa Mon Sep 17 00:00:00 2001 From: Keith Cirkel Date: Mon, 11 Dec 2023 11:16:57 +0000 Subject: [PATCH 6/9] use correct state name, remove hyphen --- source | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source b/source index 35142399421..f30ad923392 100644 --- a/source +++ b/source @@ -77688,7 +77688,7 @@ END:VCARD
      1. If the hidden attribute is in the until-found state, then return "until found state, then return "until-found".

      2. If the hidden attribute is set, then return From 164ce84da5108eb1aaf0bc2b56ab9c1ba987668c Mon Sep 17 00:00:00 2001 From: Keith Cirkel Date: Mon, 11 Dec 2023 11:24:26 +0000 Subject: [PATCH 7/9] fixup hidden state definitions, move dfn to table --- source | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/source b/source index f30ad923392..79367e46f5c 100644 --- a/source +++ b/source @@ -77539,12 +77539,12 @@ END:VCARD until-found - until found + hidden until found Will not be rendered but content inside will be accessible to find-in-page and fragment navigation The empty string - hidden + hidden Will not be rendered. hidden @@ -77555,8 +77555,8 @@ END:VCARD default">invalid value default is the hidden state.

        -

        When an element has the hidden attribute in the hidden state, it indicates that the element is not yet, or +

        When an element has the hidden attribute in the hidden state, it indicates that the element is not yet, or is no longer, directly relevant to the page's current state, or that it is being used to declare content to be reused by other parts of the page as opposed to being directly accessed by the user. User agents should not render elements that are in the indirectly through the style layer. For example, a web browser could implement these requirements using the rules suggested in the Rendering section.

        -

        When an element has the hidden attribute in the hidden until found state, it indicates that the +

        When an element has the hidden attribute in the hidden until found state, it indicates that the element is hidden like the hidden state but the content inside the element will be accessible to find-in-page and fragment navigation. When these features attempt to scroll to a @@ -77688,7 +77688,7 @@ END:VCARD

        1. If the hidden attribute is in the until found state, then return "hidden until found state, then return "until-found".

        2. If the hidden attribute is set, then return From 611d1995076d37591a3ec7b6b6c726f77159862c Mon Sep 17 00:00:00 2001 From: Keith Cirkel Date: Mon, 11 Dec 2023 11:44:26 +0000 Subject: [PATCH 8/9] move "state" out of more "hidden until found state" links --- source | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source b/source index 79367e46f5c..10f5ce3fb23 100644 --- a/source +++ b/source @@ -81211,12 +81211,12 @@ body { display:none } without modifying the open attribute, in order to make find-in-page able to search through it. Similarly, all HTML elements with the hidden attribute in the hidden until found state should have their hidden until found state should have their skipped contents become accessible without modifying the hidden attribute in order to make find-in-page able to search through them. After find-in-page finishes searching for matches, the details elements and the elements with the hidden attribute in the hidden until found state should have their contents + data-x="attr-hidden-until-found-state">hidden until found state should have their contents become skipped again. This entire process must happen synchronously (and so is not observable to users or to author code). CSSCONTAIN

          From 1de7fd53d692a400ee2676d552ae881272db6074 Mon Sep 17 00:00:00 2001 From: Keith Cirkel Date: Tue, 9 Jan 2024 14:36:37 +0000 Subject: [PATCH 9/9] move state out of span --- source | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source b/source index 10f5ce3fb23..85f1c7a38ed 100644 --- a/source +++ b/source @@ -77552,8 +77552,8 @@ END:VCARD

          The attribute's missing value default is the not hidden state, and its invalid value default is the hidden - state.

          + default">invalid value default is the hidden + state.

          When an element has the hidden attribute in the hidden state, it indicates that the element is not yet, or