microsoft / fluentui-token-pipeline

The Fluent UI token pipeline generates source code for Fluent UI libraries.
https://microsoft.github.io/fluentui-token-pipeline/
Other
41 stars 18 forks source link

Is "Focus" or "Focused" treated as a State for either WinUI, HTML or other platforms which use Tab focusing? #18

Closed mdtauk closed 3 years ago

mdtauk commented 3 years ago

https://github.com/microsoft/fluentui-token-pipeline/blob/aac26f7a301cee840aeabeb1ab8fffe6fbab529a/src/pipeline/utils.ts#L11-L19

The typical Interaction States are included here, but Focus is not included.

Perhaps it is treated differently than the other states, especially for Text and Form fields, but Windows in particular has a Focus Visual that is applied to controls when tabbing.

TravisSpomer commented 3 years ago

Right now I'm not aware of any of the platforms that plan on using distinct focus visuals (all either just using Rest + a rectangle, or hover + a rectangle), so that's not something that's "systemized" right now. But nothing stops you from defining Focused-Rest, Focused-Hover, Focused-Pressed, and Focused-Disabled, for example. This list is just used for sorting things in output for convenience and readability, not an exhaustive set.

For these sorts of "system" questions, let's handle those over Teams—I'm the only person who checks this repo right now, and elevation of focus as a first-class state is something the broader community would need to be aware of. (Technical questions about the pipeline can still go here though!)