TabBar: dotted border around clicked tab #223
-
Since ui@6.1.7, when clicking a ´Tab´ in a ´TabBar´, a dotted border is shown around the label. As seen in the screenshot and example sandbox below: |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 11 replies
-
@martinkrulltott this is actually by design - see this issue and this pr, and you can see this in the release notes of the v6.1.7 release This is an a11y (accessibility) feature of browsers which allows visual feedback when tabbing through focusable components. |
Beta Was this translation helpful? Give feedback.
-
It does seem like there could be a valid reason to unfocus the tab after it has been clicked (since that didn't depend on pre-existing focus). There appears to be some debate about how or if to do this, but blurring on Here's an example using a hack to add the event to the buttons. @cooper-joe @mediremi @paschalidi any thoughts on changing this behavior from a UI or accessibility standpoint? |
Beta Was this translation helpful? Give feedback.
-
If you try interacting with GitHub interface (see the Navigating through the "tab-like" sidebar options on the lefthand side of the Codesandbox linked above - if you click on one of the tabs, it is selected. The Active and Focused styles are identical, so this is pretty seamless. If you tab after clicking on one of the tab buttons, the focus starts from whichever tab you clicked which I think is quite nice (and is broken by the |
Beta Was this translation helpful? Give feedback.
-
@cooper-joe @varl @amcgee Does anyone have any experience with e.g. using Btw, at the moment we have four different focus indicators... dotted, blue, green and yellow border. |
Beta Was this translation helpful? Give feedback.
@martinkrulltott this is actually by design - see this issue and this pr, and you can see this in the release notes of the v6.1.7 release
This is an a11y (accessibility) feature of browsers which allows visual feedback when tabbing through focusable components.