Closed maxatdetroit closed 3 months ago
@maxatdetroit
Should thouse rules be in the src/scss/_bootstrap-variables.scss file or do I need to add them?
What's the full command to regenerate the. I just add yarn before that right?: ./scripts/compile_styles.sh.
@sreidthomas
The $focus-ring-color SCSS variable probably isn't in the src/scss/_bootstrap-variables.scss file yet. You'll need to add it.
The full command to regenerate the stylesheets is just ./scripts/compile_styles.sh
. Because it has a shebang on line 1, it can be called directly.
The Problem
When using tab to focus light elements on a dark background (as someone might due using a keyboard to navigate a site), the focus visibility of elements is non-apparent.
To Reproduce
Steps to reproduce the behavior:
Screenshots
https://github.com/user-attachments/assets/5c5f4930-7f07-433a-8a9f-7bc6ccbc0c8f
Expected Behavior
The links and buttons should have some high contrast visual indicator that they are focused using the keyboard:
https://github.com/user-attachments/assets/c81d25c0-e017-4fce-9d2f-a95aa490cb51
This behavior was demo by editing the stylesheets like the below, however this is just a reference to understand how the focus styles are computed from the theme. See the next section for a more robust fix for this issue by updating the theme.
The Solution
Override the
$focus-ring-color
SCSS variable and set it toblue
instead of$primary
insrc/scss/_bootstrap-variables.scss
.Then regenerate the theme CSS using
./scripts/compile_styles.sh
.