trix icon indicating copy to clipboard operation
trix copied to clipboard

Provide a way for people using a screen reader and/or keyboard navigation to remove attachments and add captions

Open bergatron opened this issue 8 years ago • 3 comments

There isn't a way for people using a screen reader to access the remove attachment button or the caption element associated with each attachment.

Steps to Reproduce
  1. Drop an image into the Trix editor.
  2. Press tab and shift-tab in an attempt to focus the Remove button and
    elements associated with the attachment added in step 1.
  3. Realize it's not possible to achieve.

I believe the proper way to implement this is by including the remove button and caption input elements sequentially in the tab order. In #448 we made a tweak so that attachment links are no longer included in the composer tab sequence. #448 is still an improvement since before that tabbing would just focus the around the attachment but not the remove button or

elements.

Details
  • Trix version:
  • Browser name and version: Safari
  • Operating system: 10.13.5

cc @javan @sstephenson

Press tab and shift-tab in an attempt to focus the Remove button

The remove button and caption field are only present when an attachment is selected, which you can do by moving the cursor to it with the arrow keys. Once selected you can tab to the remove button and press return to remove the attachment:

remove-by-keyboard

Does that make the remove button accessible enough? If so then it's just the caption field that needs addressing.

javan avatar Jun 11 '18 21:06 javan

Nice I think this implementation works ok. The one thing that's funky is when you focus the attachment (by moving to it with your cursor), VoiceOver speaks "space" (or I think whatever character is directly before the image), so it isn't clear that the attachment is focused. Seeing similar quirkiness with other screen readers.

bergatron avatar Jun 27 '18 21:06 bergatron

Fixed in https://github.com/basecamp/trix/pull/523

javan avatar Sep 17 '18 17:09 javan