[w3ctag/design-reviews] Modification of selection APIs to account for shadow dom (Issue #694)

Braw mornin' TAG!

I'm requesting a TAG review of modifying the selection APIs to account for shadow dom.

Shadow DOM (v1) is now supported by all evergreen rendering engines. However, the user selection APIs are not well supported for the case that the user selection crosses shadow boundaries. The existing Selection API specifies that there is only a single selection in a document and the selection is bound to a single Range, which means that it cannot represent a range over the composed tree. Said another way, if the selection crosses shadow boundaries, the existing API cannot represent this situation correctly. For backwards compatibility, we also can't update the Range API to support ranges that cross shadow boundaries, because that could break existing assumptions about ranges.

This proposal suggests a new API that lets web authors control and query selections in the composed tree.

  - Explainer¹: https://github.com/mfreed7/shadow-dom-selection#readme

  - User research: Discussion on the issue thread, starting roughly [here](https://github.com/WICG/webcomponents/issues/79#issuecomment-937219375). Plus I directly solicited feedback from three editor builders: [[1]](https://github.com/tinymce/tinymce/pull/4737#issuecomment-965902470) [[2]](https://github.com/ckeditor/ckeditor5/pull/7846#issuecomment-965901845) [[3]](https://github.com/quilljs/quill/pull/1805#issuecomment-965901490)
  - Security and Privacy self-review²: None
  - Primary contacts (and their relationship to the specification):
      - Mason Freed (@mfreed7), Google
  - Organization/project driving the design: Google
  - External status/issue trackers for this feature (publicly visible, e.g. Chrome Status): https://crbug.com/762799


Further details:

  - [X] I have reviewed the TAG's [Web Platform Design Principles](https://www.w3.org/TR/design-principles/)
  - The group where the incubation/design work on this is being done (or is intended to be done in the future): WICG
  - The group where standardization of this work is intended to be done ("unknown" if not known): WHATWG
  - Existing major pieces of multi-stakeholder review or discussion of this design: [discussion](https://github.com/WICG/webcomponents/issues/79)
  - Major unresolved issues with or opposition to this design: None that I know of
  - This work is being funded by: Google

We'd prefer the TAG provide feedback as (please delete all but the desired option):

  💬 leave review feedback as a **comment in this issue** and @-notify @mfreed7


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3ctag/design-reviews/issues/694

Received on Friday, 3 December 2021 22:46:24 UTC