Open nidico opened 4 years ago
It seems like codemirror 5 (or the codemirror author plugin) is already doing this.
Yes, authorship-gutter-xxx
and authorship-inline-xxx
classes are available as they're used for CSS styling. However authorship-inline
isn't used for content which is already covered by authorship-gutter
- as it shouldn't be underlined.
Nevertheless there are two problems:
Figuring out who authored a certain peace of text means looking for authorship-inline-xxx
(DOM hierarchy upwards) and authorship-gutter-xxx
(Dom hierarchy sidewards). The "sidewards" apsects makes parsing the DOM unnecessarily hard / slow.
Even worse: In a line, which has originally been created by user A and thus has a vertical bar in the corresponding color, no authorship-inline-xxx
classes are set in that line for user A. This can neither be distinguished from content which isn't assigned to a user (i.e. currently guest users - see codimd/server#505, and maybe in the future explicitly cleared user content - see codimd/server#506).
Both would be resolved if authorship-inline-xxx
classes would be set everywhere (though this also has visual impact which needs to be considered and is discussed in hedgedoc/hedgedoc#2892).
[accessibility]
Problem:
In order to allow screen readers to read text with individual voices or announce authorship changes, authorship information needs to be properly and (preferably) consistently marked up.
For some reason, authorship information is shown in two different ways in CodiMD (colored vertical bars and underlines) (see hedgedoc/hedgedoc#2892 for a discussion and possible enhancements).
Due to that and in particular due to hedgedoc/hedgedoc#2895, screen readers cannot (neither easily nor at all) determine authorship.
Solution:
Add
authorship-inline-xxx
classes for all (explicitly authored) content (as done in hedgedoc/hedgedoc#2892, "simple proposal", but not necessarily visible).Related issues: