Skip to content

fix: replace outline:none with :focus-visible for keyboard navigation#777

Open
jjroelofs wants to merge 7 commits into8.xfrom
jur/8.x/#772-fix-focus-indicators
Open

fix: replace outline:none with :focus-visible for keyboard navigation#777
jjroelofs wants to merge 7 commits into8.xfrom
jur/8.x/#772-fix-focus-indicators

Conversation

@jjroelofs
Copy link
Copy Markdown
Collaborator

Linked issues

Solution

Replace blanket outline: none declarations with :focus:not(:focus-visible) selectors across frontend-facing SCSS files. This preserves the outline removal for mouse/touch users while restoring visible focus indicators for keyboard navigation, fixing WCAG 2.1 AA compliance (Success Criterion 2.4.7: Focus Visible).

Files changed:

  • scss/base/typography.scss — global link focus
  • scss/components/dxpr-theme-header.scss — header navigation links
  • scss/components/dxpr-theme-header--mobile.scss — mobile menu toggle
  • scss/vendor-extensions/drupal-pager.scss — pager active state
  • scss/vendor-extensions/bootstrap-theme.scss — Bootstrap tab focus
  • scss/vendor-extensions/bootstrap-5.scss — Bootstrap 5 active tab

Admin-only styles (dxpr-theme.admin.themesettings.scss) are intentionally left unchanged as a separate concern.

Checklist

  • I have read the CONTRIBUTING.md document.
  • My commit messages follow the contributing standards and style of this project.
  • My code follows the coding standards and style of this project.
  • 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)
  • Need to run update.php after code changes
  • Requires a change to end-user documentation.
  • Requires a change to developer documentation.
  • Requires a change to QA tests.
  • Requires a new QA test.
  • I have updated the documentation accordingly.
  • All new and existing tests passed.

github-actions bot and others added 7 commits October 1, 2025 10:11
Primary tabs were being hidden for all users when admin_toolbar_tools
was configured to show local tasks, even for users without toolbar
permissions who couldn't see the tasks in the admin toolbar.

Fixes #609

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-authored-by: Jurriaan Roelofs <[email protected]>
Co-authored-by: Claude <[email protected]>
Previously, tabs were positioned with translate(-50%, -100%) which caused them to be hidden below the header on pages without a page title. Changed to translate(-50%, 0) to fix this issue.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
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