Re: [css-content] Request for note regarding selection, search, and accessibility of generated content

On 24/11/15 01:47, Florian Rivoal wrote:
>>> On 23 Nov 2015, at 03:37, Florian Rivoal <florian@rivoal.net
>>> <mailto:florian@rivoal.net>> wrote:
>>>
>>> By default (as per the legacy behavior), generated content in pseudo
>>> elements is not searchable/copyable/selectable. However, using the
>>> user-select property on the pseudos could make them
>>> searchable/copyable/selectable.

About the "user-select" property it sounds nice, but probably it'll take
long to be implemented. One important reason is that all the
editing/selection code/APIs are based on the DOM and generated content
is not in the DOM.

> Yes, there are cases where it is preferable that the user cannot select
> or copy text in the generated content. All decorative uses of generated
> content fall into this case. And we've been strongly (with more or less
> success) encouraging authors to avoid using generated content for other
> purposes than decorative ones, since it harms the semantics of the
> document, and therefore accessibility. Whether or not decorative uses
> outnumber the non decorative ones is probably the wrong question. Since
> non selectability is the legacy behavior, the question is whether
> decorative use is common enough that changing to selectable by default
> would break a significant number of previously working sites. And I
> think it is.

Joanie is precisely asking about this sentence from the previous paragraph:
"we've been strongly (with more or less success) encouraging authors to
avoid using generated content for other purposes than decorative ones".

I don't know where you've been doing this (I cannot find anything in the
specs), but adding a note in the spec explaining it will make that some
people don't use them for content.

Another point would be to change the current example in the spec, which
is adding "Note" (content, not decorative) for a different one that is
purely decorative.

Eventually, even change current specs template to avoid "EXAMPLE/ISSUE
X" being generated from pseudo-elements. Like WAI-ARIA did:
 http://www.w3.org/TR/wai-aria-1.1/#usage_intro

Bye,
  Rego

Received on Tuesday, 24 November 2015 15:49:09 UTC