fix(material/list): fix action-list focus state for high contrast fir… #23584
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.
…efox
From the commit message
Fixes the focus state on the action-list for firefox in high-contrast
mode. In firefox, the outline only renders on the top, right and left –
not the bottom. This fixes the bottom of the outline being cut-off by
setting the z-index of the focused list item to 1.
fixes #23583
Other things I've tried
Also tried using margin but that turned out to be harder than this because we would also have to update the background of the list. This seems to only happen with buttons inside the list, but works fine with divs. I know that outline works differently between Firefox and Chrome, but I couldn't find a specific bug report for this situation.
I also considered ditching outline and using a box-shadow instead, but then the action-list's focus state would match our nav-list and other lists.