[csswg-drafts] [css-pseudo] Can ::spelling-error and ::grammar-error occur anywhere?

frivoal has just created a new issue for 
https://github.com/w3c/csswg-drafts:

== [css-pseudo] Can ::spelling-error and ::grammar-error occur 
anywhere? ==
https://drafts.csswg.org/css-pseudo/#highlight-selectors

Generally, spelling/grammar mistake markers are only expected in 
editable content. 

The behavior exhibited by chrome and safari (but not Firefox and Edge)
 in the following example feels like a bug to me. Something is 
editable and gets focused (and editted), so spelling mistakes get 
highlighted. Then when it is made non editable. I would expect the 
markers to go away, but they do not.

http://output.jsbin.com/caqusop

While I think that's wrong, there's nothing in the css-pseudo spec (or
 any other spec I am aware of) to support that opinion. Should there 
be?

Should we say that the ::spelling-error and ::grammar-error pseudos 
can only occur as children of editable elements, and the browsers must
 not highlight such things in non editable content?

Or should we instead say that browser can make them match anywhere, 
but mandate (or merely recommend?) a UA stylesheet that by default 
only highlights them when they are in editable content?
```
:read-write ::spelling-error {
  text-decoration: red dotted underline;
}
:read-write ::grammar-error {
  text-decoration: green dotted underline;
}
```

Or should we just leave it up to the UA, and report these against 
browsers separately not as a case of standards violation but as a case
 of bad UX?

Please view or discuss this issue at 
https://github.com/w3c/csswg-drafts/issues/623 using your GitHub 
account

Received on Thursday, 20 October 2016 06:46:41 UTC