- From: Lea Verou via GitHub <noreply@w3.org>
- Date: Mon, 03 Nov 2025 14:19:52 +0000
- To: public-css-archive@w3.org
> It's not uncommon to use `tabindex="-1"` in HTML, so I think authors should be able to make the element click focusable but not sequentially focusable. > > And I tend to think that if authors can make an element sequentially focusable, they should be able to specify the tabindex. All of these are useful things, eventually. But do you think they are as frequently needed as `tabindex="0"`? I think we can address _a lot_ of use cases with something that behaves like `tabindex="0"` and once we have something in, it’s much easier to expand it to be more granular. > I don't think pseudo-elements are currently focusable. That would need to define what to do with `document.activeElement` and whatnot. There are pseudo-elements that are currently focusable, [`::scroll-button()`](https://drafts.csswg.org/css-overflow-5/#scroll-buttons) is one that comes to mind. For that, [`document.activeElement` points to its host element](https://drafts.csswg.org/css-overflow-5/#overflow-pseudo-focus-behavior). This is how `overflow` behaves as well when it makes an element focusable ([testcase](https://codepen.io/leaverou/pen/YPwdEQp?editors=1111)). I agree it would be better to have a way to find out which pseudo-element is active, but I don't think it’s a blocker. -- GitHub Notification of comment by LeaVerou Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/13040#issuecomment-3480809119 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Monday, 3 November 2025 14:19:53 UTC