Open jscholes opened 3 years ago
In addition, there should also be a visually visible delete button that can be activated with the mouse (and marked with aria-hidden=true, tabindex=-1). On the web, using the Delete key to delete tabs is more common than Ctrl+F4, so I think using the Delete key is fine. But of course the delete option must be programmatically mentioned, so that this is perceptible with the screenreader
@JAWS-test
In addition, there should also be a visually visible delete button that can be activated with the mouse (and marked with
aria-hidden=true
,tabindex=-1
).
I agree there should be an additional means of deleting a tab, because the functionality is completely unusable on touch devices at present. Having said that, a button with aria-hidden
and tabindex
-1 wouldn't fix that. It would only make it accessible on mobile to users who could see the button.
@jscholes You are right. I didn't think about touch devices because so far not all APG examples support that. But of course it would be good to equip as many examples as possible with touch support.
The Tabs With Manual Activation example allows the third tab to be deleted. This is not necessarily expected behaviour, e.g. because on Windows tabs are usually dismissed with Ctrl+F4 and/or Ctrl+W, and I can't think of a single interface that allows the Delete key to be used for the same purpose. As such, the lack of screen reader announcement when the key is pressed, and the fact that there is no accessible description on the third tab or tab control to surface the affordance, are concerning.
Note: if the page is serving to inspire a production-ready interface, it may also be appropriate to add undo functionality to restore the deleted tab.