-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
inert on an ancestor of modal dialog #7808
Comments
https://html.spec.whatwg.org/#modal-dialogs-and-inert-subtrees doesn't specify either behavior, afaict. |
Oh, I guess https://html.spec.whatwg.org/#the-inert-attribute sort-of does, by saying all flat tree descendants are affected, and the section linked above hints that the desired behavior is Chrome's? Curious about the reasoning for that?
|
It was pre-existing the inert changes to the spec. This doesn't really say anything about this particular issue. It could also be interpreted as either "this doesn't prevent the inert attribute from applying on the dialog element", as much as "this doesn't prevent parent elements with inert from applying on the dialog element". I'd be fine with either resolution, but as long as it is consistent with how with handle other things, e.g. in w3c/csswg-drafts#6939 (comment) we decided that modal dialogs escape |
I agree. Given that WebKit / Gecko behavior here seems preferable. |
There was some discussion in web-platform-tests/wpt#31668 I didn't change Blink in this regard since the spec says:
I don't have much opinion about which behavior is preferable. But aligning with WebKit and Gecko would simplify a bit the implementation (inertness could be a bool instead of an enum with 3 values). cc @mfreed7 |
Just so I understand the question: <div inert>
<dialog id=foo>Inert or not?</dialog>
</div> Right? It sounds like the desired behavior is to make the
So my vote is to make |
If an ancestor of a modal <dialog> has the 'inert' attribute, the dialog and its subtree will no longer be inert. However, if the 'inert' attribute is in the <dialog> itself, then the subtree will still be inert. This aligns Blink with Gecko and WebKit. The spec conversation about this topic is in whatwg/html#7808 Bug: 1323680 TEST=external/wpt/inert/inert-with-modal-dialog-001.html TEST=StyleResolverTest.IsInertWithAttributeAndDialog Change-Id: Id2752ce3d1c8985b68b1d700710c3ff3eb100714
If an ancestor of a modal <dialog> has the 'inert' attribute, the dialog and its subtree will no longer be inert. However, if the 'inert' attribute is in the <dialog> itself, then the subtree will still be inert. This aligns Blink with Gecko and WebKit. The spec conversation about this topic is in whatwg/html#7808 Bug: 1323680 TEST=external/wpt/inert/inert-with-modal-dialog-001.html TEST=StyleResolverTest.IsInertWithAttributeAndDialog Cq-Include-Trybots: luci.chromium.try:linux-blink-web-tests-force-accessibility-rel Change-Id: Id2752ce3d1c8985b68b1d700710c3ff3eb100714
If an ancestor of a modal <dialog> has the 'inert' attribute, the dialog and its subtree will no longer be inert. However, if the 'inert' attribute is in the <dialog> itself, then the subtree will still be inert. This aligns Blink with Gecko and WebKit. The spec conversation about this topic is in whatwg/html#7808 Bug: 1323680 TEST=external/wpt/inert/inert-with-modal-dialog-001.html TEST=StyleResolverTest.IsInertWithAttributeAndDialog Cq-Include-Trybots: luci.chromium.try:linux-blink-web-tests-force-accessibility-rel Change-Id: Id2752ce3d1c8985b68b1d700710c3ff3eb100714
If an ancestor of a modal <dialog> has the 'inert' attribute, the dialog and its subtree will no longer be inert. However, if the 'inert' attribute is in the <dialog> itself, then the subtree will still be inert. This aligns Blink with Gecko and WebKit. The spec conversation about this topic is in whatwg/html#7808 Bug: 1323680 TEST=external/wpt/inert/inert-with-modal-dialog-001.html TEST=StyleResolverTest.IsInertWithAttributeAndDialog Cq-Include-Trybots: luci.chromium.try:linux-blink-web-tests-force-accessibility-rel Change-Id: Id2752ce3d1c8985b68b1d700710c3ff3eb100714 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3634684 Reviewed-by: Aaron Leventhal <aleventhal@chromium.org> Reviewed-by: Mason Freed <masonf@chromium.org> Commit-Queue: Oriol Brufau <obrufau@igalia.com> Cr-Commit-Position: refs/heads/main@{#1006974}
If an ancestor of a modal <dialog> has the 'inert' attribute, the dialog and its subtree will no longer be inert. However, if the 'inert' attribute is in the <dialog> itself, then the subtree will still be inert. This aligns Blink with Gecko and WebKit. The spec conversation about this topic is in whatwg/html#7808 Bug: 1323680 TEST=external/wpt/inert/inert-with-modal-dialog-001.html TEST=StyleResolverTest.IsInertWithAttributeAndDialog Cq-Include-Trybots: luci.chromium.try:linux-blink-web-tests-force-accessibility-rel Change-Id: Id2752ce3d1c8985b68b1d700710c3ff3eb100714 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3634684 Reviewed-by: Aaron Leventhal <aleventhal@chromium.org> Reviewed-by: Mason Freed <masonf@chromium.org> Commit-Queue: Oriol Brufau <obrufau@igalia.com> Cr-Commit-Position: refs/heads/main@{#1006974}
If an ancestor of a modal <dialog> has the 'inert' attribute, the dialog and its subtree will no longer be inert. However, if the 'inert' attribute is in the <dialog> itself, then the subtree will still be inert. This aligns Blink with Gecko and WebKit. The spec conversation about this topic is in whatwg/html#7808 Bug: 1323680 TEST=external/wpt/inert/inert-with-modal-dialog-001.html TEST=StyleResolverTest.IsInertWithAttributeAndDialog Cq-Include-Trybots: luci.chromium.try:linux-blink-web-tests-force-accessibility-rel Change-Id: Id2752ce3d1c8985b68b1d700710c3ff3eb100714 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3634684 Reviewed-by: Aaron Leventhal <aleventhal@chromium.org> Reviewed-by: Mason Freed <masonf@chromium.org> Commit-Queue: Oriol Brufau <obrufau@igalia.com> Cr-Commit-Position: refs/heads/main@{#1006974}
…ss from ancestors, a=testonly Automatic update from web-platform-tests [inert] Let modal dialogs escape inertness from ancestors If an ancestor of a modal <dialog> has the 'inert' attribute, the dialog and its subtree will no longer be inert. However, if the 'inert' attribute is in the <dialog> itself, then the subtree will still be inert. This aligns Blink with Gecko and WebKit. The spec conversation about this topic is in whatwg/html#7808 Bug: 1323680 TEST=external/wpt/inert/inert-with-modal-dialog-001.html TEST=StyleResolverTest.IsInertWithAttributeAndDialog Cq-Include-Trybots: luci.chromium.try:linux-blink-web-tests-force-accessibility-rel Change-Id: Id2752ce3d1c8985b68b1d700710c3ff3eb100714 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3634684 Reviewed-by: Aaron Leventhal <aleventhal@chromium.org> Reviewed-by: Mason Freed <masonf@chromium.org> Commit-Queue: Oriol Brufau <obrufau@igalia.com> Cr-Commit-Position: refs/heads/main@{#1006974} -- wpt-commits: 526608c590f67192d8c3b688ba04b7b74bfed32d wpt-pr: 33997
…ss from ancestors, a=testonly Automatic update from web-platform-tests [inert] Let modal dialogs escape inertness from ancestors If an ancestor of a modal <dialog> has the 'inert' attribute, the dialog and its subtree will no longer be inert. However, if the 'inert' attribute is in the <dialog> itself, then the subtree will still be inert. This aligns Blink with Gecko and WebKit. The spec conversation about this topic is in whatwg/html#7808 Bug: 1323680 TEST=external/wpt/inert/inert-with-modal-dialog-001.html TEST=StyleResolverTest.IsInertWithAttributeAndDialog Cq-Include-Trybots: luci.chromium.try:linux-blink-web-tests-force-accessibility-rel Change-Id: Id2752ce3d1c8985b68b1d700710c3ff3eb100714 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3634684 Reviewed-by: Aaron Leventhal <aleventhal@chromium.org> Reviewed-by: Mason Freed <masonf@chromium.org> Commit-Queue: Oriol Brufau <obrufau@igalia.com> Cr-Commit-Position: refs/heads/main@{#1006974} -- wpt-commits: 526608c590f67192d8c3b688ba04b7b74bfed32d wpt-pr: 33997
If an ancestor of a modal <dialog> has the 'inert' attribute, the dialog and its subtree will no longer be inert. However, if the 'inert' attribute is in the <dialog> itself, then the subtree will still be inert. This aligns Blink with Gecko and WebKit. The spec conversation about this topic is in whatwg/html#7808 Bug: 1323680 TEST=external/wpt/inert/inert-with-modal-dialog-001.html TEST=StyleResolverTest.IsInertWithAttributeAndDialog Cq-Include-Trybots: luci.chromium.try:linux-blink-web-tests-force-accessibility-rel Change-Id: Id2752ce3d1c8985b68b1d700710c3ff3eb100714 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3634684 Reviewed-by: Aaron Leventhal <aleventhal@chromium.org> Reviewed-by: Mason Freed <masonf@chromium.org> Commit-Queue: Oriol Brufau <obrufau@igalia.com> Cr-Commit-Position: refs/heads/main@{#1006974} NOKEYCHECK=True GitOrigin-RevId: 164a13142f64c249d85e219cf745c371fc51b701
So should we do the same for elements that have the popover attribute added? |
I don't think general popovers should escape |
In w3c/csswg-drafts#6685 (comment) we did various resolutions for
inert
behavior and updated tests.https://wpt.fyi/results/inert/inert-with-modal-dialog-001.html shows that Firefox and WebKit agree on behavior on the
inert
attribute on an ancestor of a modal dialog, but Blink does not, and the test agrees with this.I think making a modal dialog inert in this case is potentially undesired. WebKit and Gecko allow you to do this by explicitly marking the dialog
inert
. I thought Blink had moved to the WebKit and Gecko model for the inert attribute but either this was missed or not changed intentionally?Since Blink and WebKit are shipping dialog soon-ish, it'd be nice to sort this compat difference.
cc @nt1m @Loirooriol
The text was updated successfully, but these errors were encountered: