Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tabs With Manual Activation example: consistency of activation Behaviour when deleting a tab #1740

Open
jscholes opened this issue Jan 28, 2021 · 1 comment

Comments

@jscholes
Copy link
Contributor

The aim of the Tabs With Manual Activation example is to demonstrate the mark-up and behaviour of a tab system where automatic activation isn't desirable. The consistency of this behaviour may be undermined during tab deletion; specifically:

  1. Open the example page which has the first tab ("Nils Frahm") activated by default.
  2. With a screen reader in focus/forms mode, move focus to the third tab ("Joke") without activating it.
  3. Press Delete.

At this point, the second tab ("Agnes Obel") becomes automatically activated, even though it wasn't explicitly activated by the user before deletion of the third tab. In other words, the first tab's content was showing, so there was no explicit need to activate a different tab after deletion of the third one.

My initial thoughts are that:

  1. If the third tab is deleted while in an activated state, it is necessary to automatically activate the tab to the left. But...
  2. If the third tab is deleted while one of the other tabs is active, it is of course necessary to move focus to a different tab in the list, but not to unexpectedly change the activated one.

The outstanding question, therefore, would be where focus should move when the third tab is deleted without another tab being automatically activated. This could be the tab to the left, even if that one isn't activated, or the previously activated tab. Practically speaking, that would mean:

  1. If the first tab is activated and the third gets deleted, focus could land on the first tab or the second tab.
  2. If the second tab is active when the third is deleted, focus should probably land on the second one regardless.
@jongund
Copy link
Contributor

jongund commented Jan 28, 2021

I agree that deleting the third tab should not change that activated tab, unless the deleted tab was the one with the active state. I think the example also needs a visual affordance that it can be deleted, for example a box with an X (e.g. ☒).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants