deltachat / deltachat-desktop

Email-based instant messaging for Desktop.
GNU General Public License v3.0
914 stars 166 forks source link

Accessibility: Grid component does not work with screen readers #2138

Open MarcoZehe opened 3 years ago

MarcoZehe commented 3 years ago

Proposed solution

Since the role is inherited from the React Grid component, it should be overridden in the ChatList.ts file with something more appropriate. Possible solutions:

  1. The <list> component gets a role of "region", and an aria-label of "Chats". The individual entries that current have a role of "button" stay as they are.
  2. The <list> component gets a role of "table", and each item that is currently a role of "button" gets a role of "row". The <avatar>and other children that contain individual bits of information get a role of "cell" each. That way, this is presented to screen readers as a true table where they can query the individual items of each entry. Right now, the button role causes all of that info to be mingled together, because technically, buttons aren't allowed to have accessible children.
  3. The <list> component gets a role of "listbox", and each item that now is a role "button" becomes a role "option". But then, proper keyboard and focus handling must be implemented as well, as stated in the listbox design pattern. The proposed interaction would be that using arrows would just change the selection, and pressing Enter would actually open the selected conversation, like double-clicking. Otherwise, each arrow key press would immediately load the new conversation, which may cause delays.

In short, option 2 would put the burden on the screen reader, and would still not work for keyboard users. Option 3 would be the correct implementation for this widget.

ghost commented 3 years ago

Thanks @MarcoZehe for opening the issue. I think it's very important to be able to make Delta Chat as accessible as possible.

bdorer commented 3 years ago

Please note: To test this and other accessibility tickets you could use an opensource screenreader called NVDA found on nvaccess.com or github.com/nvaccess/nvda.