- From: Ophir Lifshitz via GitHub <sysbot+gh@w3.org>
- Date: Tue, 19 Dec 2023 17:15:34 +0000
- To: public-css-archive@w3.org
Some annotations may contain meaningful text that one might want to find in some situations, but not in others. This may motivate a use case beyond only two simple values. Taking an example from my OP:
> Pablo <ruby><rb>Casals</rb><rp> (“</rp><rt>kuh-ZALLS</rt><rp>”)</rp></ruby> became
> ```html
> Pablo <ruby><rb>Casals</rb><rp> (“</rp><rt>kuh-ZALLS</rt><rp>”)</rp></ruby> became
> ```
A third option `both` could be most flexible in situations where the developer cannot assume the user’s intent at any point:
| `rt, rp { user-find: ____ }` | `Casals became` | `kuh-ZALLS` | `Casals (“kuh-ZALLS”) became`
:-|-|-|-
| `auto`: yes, annotation is always in text flow | not found | found | found
| `none`: no, annotation taken out before find | found | not found | not found
| `both`: skippable, tries both options above | found | found | found
Another upside of a third value (`both` or `optional` or whatever you call it) is that it can apply to parentheses (`rp`).
I don't know how browsers implement finding, but the effect of `both` is like wrapping a `(…)?` around a regular expression or branching on epsilon in a state machine. Probably easier said than done and there may be other complexities (like what if multiple overlapping matches cross a skippable annotation?).
Perhaps creating a new ARIA role `"annotation"` that defaults to this `both` value would help users of assistive technology (AT). Users can still access the annotations (as they are meaningful), but they live in a separated context outside the running text without interrupting it, and can optionally skip them (as a whole or individual). Then the implicit ARIA role of `rt` and `rp` can become `"annotation"`.
---
While the topic is fresh, maybe a similar issue of controlling copyability should be considered (probably in another thread). Currently, it is not possible to control whether ruby parentheses (`rp`) get copied. And if the author didn’t explicitly provide parentheses, should the lack of `rp` generate parentheses when the user is copying? The status quo is an unreadable result that looks like `Casalskuh-ZALLS became` even when `rp` exist.
--
GitHub Notification of comment by hftf
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/3460#issuecomment-1863181925 using your GitHub account
--
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Tuesday, 19 December 2023 17:15:36 UTC