Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

I want to revive the CSS nav-index property, for tab order management in the age of Flexbox and Grid #249

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

Closed
aarongustafson opened this issue Dec 11, 2020 · 2 comments
Assignees
Labels
Moonshot want Incoming requests from the community

Comments

@aarongustafson
Copy link
Member

aarongustafson commented Dec 11, 2020

With the proliferation of Flexbox and Grid layout, it is imperative, accessibility wise, to be able to control tab order via CSS.

We already have a property that does this - nav-index - that died an untimely death and is only supported by Opera (as far as I know) right now.

Currently tabindex attribute is completely inadequte to handle responsive layout, and the if you need one element to be the first in tab order, you cannot do it because the default tabindex is 0, and any negative value makes the element inaccessible.

And the alternative of assigning a tabindex for every other focusable element on the page is a ridiculous proposition.

Having nav-index also enable focus trapping with pure CSS:

* {nav-index:1}
dialog * {nav-index:2}
dialog > :first-child:not(:focus) {nav-index:0}
@aarongustafson aarongustafson added the want Incoming requests from the community label Dec 11, 2020
@aarongustafson aarongustafson self-assigned this Dec 11, 2020
@ststimac ststimac reopened this May 17, 2021
@WebWeWant WebWeWant deleted a comment from github-actions bot May 25, 2021
@aarongustafson
Copy link
Member Author

During triage today: We’d to broaden the scope of this a bit to discuss sequential navigation and the interplay between CSS & HTML.

@aarongustafson
Copy link
Member Author

Complexities:

  1. Every element is (potentially) interactive
  2. WebVR makes this even more complicated

@WebWeWant WebWeWant locked and limited conversation to collaborators Apr 10, 2025
@aarongustafson aarongustafson converted this issue into discussion #732 Apr 10, 2025

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
Moonshot want Incoming requests from the community
Projects
None yet
Development

No branches or pull requests

3 participants