Skip to content

TMS-1160: Fix elements focus outline thickness#542

Merged
eebbi merged 3 commits intomasterfrom
TMS-1160
Aug 13, 2025
Merged

TMS-1160: Fix elements focus outline thickness#542
eebbi merged 3 commits intomasterfrom
TMS-1160

Conversation

@eebbi
Copy link
Contributor

@eebbi eebbi commented Aug 12, 2025

Severa-ID: 2247
Severa-kuvaus: TMS-1160 Saavutettavuus: Vapriikin kohdistuksia puuttuu + muutoksia niihin
Task: https://hiondigital.atlassian.net/browse/TMS-1160

Description

Improve focus outlines for elements to improve accessibility

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Summary of Changes

Hello @eebbi, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request addresses accessibility by enhancing the visual clarity of focus outlines for various interactive elements across the application. The primary goal is to make keyboard navigation more apparent and user-friendly by increasing the thickness of these outlines in several CSS files. This change ensures that users relying on keyboard input can more easily identify the currently focused element, thereby improving overall usability and adherence to accessibility standards.

Highlights

  • Typography Focus Styles: The outline thickness for a:focus and a.is-focused states in _typography.scss has been increased from 0.0625rem to 0.15rem, along with the addition of an outline-offset of 0.2rem.
  • Subpages Link Focus: The outline thickness for a:focus states within _subpages.scss has been updated from 0.0625rem to 0.15rem.
  • Table Focus Styles: The outline thickness for table.idc-element:focus in _table.scss has been increased from 0.0625rem to 0.15rem, with a corresponding adjustment to its outline-offset from -0.0625rem to -0.15rem.
  • Navbar Focus Styles: The outline thickness for focus states in _bulmally-navbar.scss has been changed from 0.0588rem to 0.15rem.
  • Changelog Update: A new entry for "TMS-1160: Fix elements focus outline thickness" has been added to the CHANGELOG.MD file under the "Unreleased" section.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in issue comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request successfully improves accessibility by increasing the thickness of focus outlines for various elements, which is a great enhancement. The changes are consistent across all modified files. My main feedback is to abstract the hardcoded CSS values like 0.15rem for outline into shared SCSS variables. This will significantly improve the code's maintainability, making it easier to update these values consistently across the entire project in the future.

Comment on lines +26 to +27
outline: .15rem dotted;
outline-offset: .2rem;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The values .15rem for outline and .2rem for outline-offset are hardcoded. To improve maintainability, consider defining these as shared SCSS variables (e.g., $focus-outline-width, $focus-outline-offset) in a central settings file like assets/styles/settings/_settings.scss. The outline width in particular is used in multiple files, so a shared variable for it would be very beneficial for consistency and ease of future changes.

Comment on lines +14 to 15
outline: .15rem solid $text;
outline-offset: .25rem;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The values .15rem for outline and .25rem for outline-offset are hardcoded. For better maintainability, these should be replaced with shared SCSS variables defined in a central location. The outline width is used in several other files modified in this PR.

Comment on lines +257 to +258
outline: 0.15rem dotted;
outline-offset: -0.15rem;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The outline width (0.15rem) and outline-offset (-0.15rem) are hardcoded. To improve maintainability, these should be replaced with shared SCSS variables. This would also make the relationship between the two values explicit (e.g., by defining $focus-outline-width: 0.15rem; and then using outline-offset: -$focus-outline-width;).

Comment on lines +30 to 31
outline: .15rem dotted $primary-invert;
outline-offset: .25rem;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The outline width .15rem and outline-offset .25rem are hardcoded here. Please consider using globally defined SCSS variables for these values for consistency and maintainability across the project.

@eebbi eebbi merged commit eb93da7 into master Aug 13, 2025
2 of 4 checks passed
@eebbi eebbi deleted the TMS-1160 branch August 13, 2025 16:08
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.

1 participant