Skip to content

[css-ui-4] Name of interactivity property is ambiguous #11849

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

Open
lukewarlow opened this issue Mar 6, 2025 · 7 comments
Open

[css-ui-4] Name of interactivity property is ambiguous #11849

lukewarlow opened this issue Mar 6, 2025 · 7 comments
Labels

Comments

@lukewarlow
Copy link
Member

See https://drafts.csswg.org/css-ui-4/#inertness this property name is rather ambiguous given it's very tightly linked to inertness.

If we in future wanted to add an ability to make something focusable via CSS would this property be the right place? Would we want different behaviour (inheritance might be different?).

Just a thought I had when reading the spec the name seems potentially problematic.

@lukewarlow lukewarlow added the css-ui-4 Current Work label Mar 6, 2025
@emilio
Copy link
Collaborator

emilio commented Mar 7, 2025

cc @mfreed7

@emilio
Copy link
Collaborator

emilio commented Mar 7, 2025

(and @flackr)

I personally don't have strong opinion here. interactivity: none makes the element not focusable, but if we want to control focusability with CSS more explicitly, it seems user-focus or so might be a more consistent property name.

@emilio
Copy link
Collaborator

emilio commented Mar 7, 2025

I don't have a problem with interactivity as a name. Potentially more specific names could be inert: inert | auto or so, but that does restrict a bit expanding this property in the future if we want.

Anyways @annevk brought concerns about this in whatwg/html#10956, would be good to get a resolution one way or another here?

@emilio
Copy link
Collaborator

emilio commented Mar 7, 2025

Existing resolution in #10711 (comment) fwiw

@chrishtr
Copy link
Contributor

chrishtr commented Mar 7, 2025

I also think interactivity is a fine name. +1 also to interactivity allowing more values in the future if we want.

Also, user-focus is not all that the property does so is too specific.

@mfreed7
Copy link
Contributor

mfreed7 commented Mar 7, 2025

cc @mfreed7

Thanks. +1 to interactivity. It's a general word that can capture changes to interactivity generally. In particular, it seems more amenable to future values that affect "interactivity" without going all the way to "inertness", such as interactivity: not-keyboard-focusable.

@lukewarlow
Copy link
Member Author

I'm happy to accept this and close this issue, was just something that came up. I still think it might be odd if you had the opposite situation where you wanted to make something keyboard focusable with CSS (not sure that'll ever happen but imagine it does) interactivity: keyboard-focusable doesn't guaruntee it's focusable because the browser could still inert it via modal dialog magic and that might be "weird". But it's probably fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Regular agenda
Development

No branches or pull requests

4 participants