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
Universal Focus State #790
Comments
Just realized there is issue #786 @jgiardino states:
|
Universal focus state visual design |
from @mceledonia on slack |
Just dropping a note here that whenever this gets implemented it should be tested with the Tabs component. Discussion about this starts here. |
Giving this a bump @rachael-phillips @mcoker design work here should be done, might need to have some discussion around how this behaves with certain components such as tabs and input groups, but overall I think we are set to implement. |
Want to note here the last discussion that took place on this topic: We would like to shift directions here, going with browser default focus states when applicable, and our custom focus state design only when the browser default state does not work. We reached this conclusion after a better understanding that keyboard users are far more accustomed to and expect browser default focus states. As this is an accessibility focused feature, we want to accommodate that use case as best as we can by providing an expected experience. |
Thanks for recapping that here, @mceledonia! If this issue is only to focus on components that require custom focus indication, then can we bump this up in priority to address components that need this? |
Do we understand how many components are impacted and which ones those are @jgiardino ? |
@LHinson I think that will take some coordinated efforts with dev + design to test which components work with browser default states and which do not. I'd be happy to help with this. |
I've been working on something related to this issue within the scope of Cockpit. We needed to replace the on/off switch component in Cockpit, for several different reasons (including usability and accessibility). I opted for making something that resembles PF4, but with PF3 colors, so it wouldn't clash. As the PF4 widget doesn't have focus, when implementing ours, I figured out a way to get native-looking focus states into our custom widget and how to have them show up on keyboard navigation without displaying on a mouse click. Our HTML is similar to this demo, but a little different. It's in React and swaps things out a bit, whereas this demo is pure HTML+CSS. The LESS is basically copy/pasted from our codebase. DEMO at https://codepen.io/garrett/pen/MRZYaV — be sure to check it in multiple browsers. (Basically Firefox and something that's not Firefox.) To see a focus ring, click on a heading and hit tab. Outlines are created with absolute positioning on a By default, the outlines use a Chrome-style blue outline, but switch to a dotted outline for Firefox, using To get around styling a click versus tab, I figured out that we could use (In the future, we could rely on Perhaps some of this might be useful for PF4's focus state? We could use native focus indicators where possible and emulate them with above techniques for custom widgets. |
@garrett Thanks for sharing your example! It's a great POC on the things that should be considered regarding focus styles. I chatted with @mcoker and @mceledonia today about how to address this in PF4, and ultimately we're leaning toward a minimal approach to handling focus styles, at least initially. This is a summary of what we discussed.
@mceledonia @mcoker Please add anything I missed, or correct me if I captured something incorrectly. :-) |
Just wanted to leave this spec here with our new blue color change: [deleted] see below |
Commenting to update: new styling for universal focus state here #1824 |
Designing a focus state pattern which works across all components. The focus state visual design should be independent of the component's other states such as hover or active.
Focus State PF4.png.zip
The text was updated successfully, but these errors were encountered: