Skip to content
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

Add note on Shadow DOM behavior about dialog focusing steps. #2394

Closed
wants to merge 2 commits into from

Conversation

TakayoshiKochi
Copy link
Member

@TakayoshiKochi TakayoshiKochi commented Feb 24, 2017

Add note on Shadow DOM behavior about dialog focusing steps.

Until we have consensus on defined behavior for Shadow DOM, any usage of Shadow DOM in <dialog> element is an undefined behavior and could break anytime.

Filed an issue at #2393.

Copy link
Member

@foolip foolip left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Having this note seems OK, but will defer to @domenic who was already involved on crbug.com/383230

source Outdated
@@ -56744,6 +56744,10 @@ interface <dfn>HTMLDialogElement</dfn> : <span>HTMLElement</span> {

</ol>

<p class="note">There is no well defined behavior about how focus works when Shadow DOM is used
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like most links to problems in the HTML spec itself use <p class="warning">.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed to warning class.

Add a warning that we don't have defined behavior of initial focus
if Shadow DOM is used in <dialog> element.
@domenic
Copy link
Member

domenic commented Feb 24, 2017

I don't think we should add a warning specific to dialog. The entire focus section right now does not take into account shadow DOM. There's nothing special about dialog; the same warning applies to every element.

@TakayoshiKochi
Copy link
Member Author

Okay, focus for Shadow DOM is not defined in the HTML spec, though patch exists in Shadow DOM spec - here, we don't have any definition to select control if Shadow DOM is involved in <dialog>, so we see different levels of problems (of course the former is in higher level in dependency).

So does it make sense to change the warning as
"There is no well defined algorithm yet on selecting control if Shadow DOM is used in <dialog>."?

@foolip
Copy link
Member

foolip commented Feb 24, 2017

Leaving this to @domenic now since he has more context.

@domenic
Copy link
Member

domenic commented Feb 24, 2017

No, I still think it makes no sense to have this warning be in the dialog section at all. There is no algorithm in the HTML spec for focus at all with shadow DOM. What we need is a warning saying that if you are looking at anything in the focus section, the HTML spec does not have a well-defined algorithm for dealing with shadow DOM. Dialog is not special.

@rniwa
Copy link

rniwa commented Feb 25, 2017

Yeah, I agree with @domenic that this warning is misleading given the focus navigation behavior isn't defined for all other cases involving the shadow tree. It's probably better to not add this, and spec the whole focus navigation ordering sometime later.

@foolip
Copy link
Member

foolip commented Feb 27, 2017

Concretely, would it make sense to have a warning in https://html.spec.whatwg.org/multipage/interaction.html#focus and do we have a more generic issue than #2393 to link to? Or maybe rename that one?

We don't have warnings for all outstanding warnings however, but as a test for when we could use one, any implementer wanting it seems fair.

@rniwa
Copy link

rniwa commented Feb 28, 2017

I don't think it's useful to have a warning about how things aren't spec'ed. We should be just writing specs, not adding warnings about how things aren't spec'ed.

@TakayoshiKochi
Copy link
Member Author

Thanks for your feedback. I'll withdraw this PR and defer the rest of the task to #1583.

@TakayoshiKochi TakayoshiKochi deleted the dialog-focus branch June 25, 2018 09:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants