Skip to content

Conversation

aardrian
Copy link
Contributor

This supports keyboard-only users by replicating the hover states as focus styles. The catch is that the hover states are on the container and the interactive control, necessitating :focus-within. Because this selector will kill an entire style for IE users when added into another selector, it warrants its own stand-alone selector (and still leaves IE users unsupported for focus styles, so there is still a gap). Also, I do not know SASS (woo!).

This supports keyboard-only users by replicating the hover states as focus styles. The catch is that the hover states are on the container _and_ the interactive control, necessitating `:focus-within`. Because this selector will kill an entire style for IE users when added into another selector, it warrants its own stand-alone selector (and still leaves IE users unsupported for focus styles). Also, I do not know SASS. So yeah.
@aardrian
Copy link
Contributor Author

BTW, if you want to test in your browser dev tools, these are the styles I am trying to get into your SASS files:

.featurelist__item__tag:focus-within {
    background-color: transparent;
}

.featurelist__item__presented:focus-within a {
    color: #a63446;
}

.featurelist__item__tests:focus-within a {
    color: #017e78;
}

.featurelist__item__spec:focus-within a {
    color: #AB6700;
}

@littledan littledan merged commit e7bd765 into tc39:master Mar 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants