fix: a11y: aria-live for draft quote & attachment#4693
Conversation
76640e8 to
28ac245
Compare
|
About the politeness level: maybe we want See https://w3c.github.io/aria/#aria-live
|
I don't think so. |
28ac245 to
5ad3712
Compare
This is handy for the Ctrl + Up shortcut, and also adds confirmation for when using the regular way, i.e. context menu -> reply. Same for attachments.
| <section | ||
| // Keep in mind that this element also changes when switching | ||
| // between chats. | ||
| // We probably want such changes to be announced still. |
There was a problem hiding this comment.
Hmm I don't think so. This is confusing and useless when switching chats, switching chats can be considered a form of "navigation", thus we must not announce the changes.
I would like to refactor useDraft such that it returns loadingDraft, which we can then use to only apply aria-live when we have finished loading the draft initially.
But there is another MR pending which deals which moves useDraft to a separate file. Let's do this later to avoid conflicts.
5ad3712 to
13b00c6
Compare
|
Hello @WofWca , Today morning I've got a different idea on how to possibly resolve this issue in a different way, and I'd say it's less prone to variability of aria region implementation issues within screen readers and avoids possible timing issues. When navigating the deltachat desktop UI the chat input entry has placeholder saying something like "Type in a message". This is also being used as a screen reader accessible label for the edit control. When there is a content above the chat input entry such as a message I am replying to, or a different content, lets change the aria-label for the chat input entry that will notify screen reader users to the fact there is something important in there. The downside is that this will only be accessible when the chat input is focused however that's the default use case anyways so I think that's a good trade off between reliability and usability. What do you think? |
|
Hi @pvagner ! Interesting idea. So basically something like I am afraid that changing Another possible way is to have the label on the wrapper region, i.e. the composer region, which wraps the attachment, reply, and the input: deltachat-desktop/packages/frontend/src/components/composer/Composer.tsx Lines 538 to 546 in 955b6f3 |
|
Hello @WofWca Thanks for acknowledging my idea. My assumption goes like this and I need to verify it and look through the code you are suggesting to take a look at.
Greetings Peter |
My guess is that this won't be that usefull as the label of ancestors such as groupings and pannels are only read while navigating e.g. when focus moves from one part of the UI to the other one. Here is an example that illustrates this feature
|
This is handy for the Ctrl + Up shortcut,
and also adds confirmation for when using the regular way,
i.e. context meny -> reply.
Same for attachments.
TODO:
aria-atomicdoesn't work for some reason. It only announces the changes. E.g. if the author's name didn't change, it won't announce it.