Open
Conversation
lydell
added a commit
to insurello/elm-ui
that referenced
this pull request
Feb 5, 2025
This applies mdgriffith#362 Conflicts: src/Internal/Model.elm
|
@lydell did you close the PR on purpose ? I have a feeling the issue is still valid and need fixing in elm-ui itself. |
Author
|
Yes, I closed it by mistake. Thanks for letting me know. |
|
@mdgriffith Sorry to bother you with this but is there any chance this gets into a release in a not-too-far release ? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Chrome is rolling out a change that affects elm-ui: https://developer.chrome.com/blog/keyboard-focusable-scrollers
The new thing is that scrollable elements can be focused now (in some situations), to aid keyboard using people – they can now focus scrollable elements to then scroll them using the keyboard.
To test it:
Problem: All buttons inside get their focus styling.
This happens because elm-ui’s focus CSS looks like this.
Let’s break those selectors down. We’ll start with the second part.
.s.focusable:focusis easy to understand: When a focusable element gets focus, it is styled..s:focus .focusableis more difficult. It says that if a certain parent element has focus, all focusable elements inside get their focus styles. This is causing the issue. By reading the code, the only place where this is needed seems to be checkboxes and radio groups. In those cases, a<label class="s">parent element gets focus, but an element inside (the actual checkbox (square) or radio (circle)) is supposed to get the styles.This PR changes the first selector to
label.s:focus .focusable, which solves the problem with scrollable.selements giving styles to all its focusable children. (It is very unlikely to use a<label>element in that situation). This depends on that my reading of the code is correct, that it is only ever<label>elements that this CSS selector should start at.