Re: [csswg-drafts] [css-highlight-api] i18n self review (#5771)

Thanks for this self-review!

Note about this item:

>> If the spec (or its implementation) allows the user to point into text, creates text fragments, concatenates text, allows the user to select or step through text (using a cursor or other methods), etc.
> It does not.
> However, it allows the author to do point to text fragments. It uses the pre-existing [Range object](https://dom.spec.whatwg.org/#range) from the DOM specification for that. Authors should be careful when doing so to avoid accidentally putting fragment boundaries in the middle of grapheme clusters. The Range object allows for that, but admittedly does not facilitate it. If it would be deemed useful to give authors advice about careful usage of the Range object to avoid getting into difficult i18n situations, it would seem more appropriate to include that advice in the upstream DOM specification.

It's a little narrow to view "user" in our checklist only as the _end-user_, since authors are likely to be the "users" of this feature. :-)

I believe we have commented about Range objects and the I18N challenges that emanate from the DOM Range in the past. It is probably a good idea to provide a health warning about about these types of issues, even if we "take it up" with the DOM spec, although I note that the API can't really *do* anything about these issues.

Some thought might be given to providing examples (or linking to them in the I18N space) for bidi considerations and also for doing things like highlighting a combining mark or base character... 

-- 
GitHub Notification of comment by aphillips
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/5771#issuecomment-1030489855 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Saturday, 5 February 2022 01:31:10 UTC