Skip to content

Examples: restore sidebar dropdown focus outline - #42710

Merged
julien-deramond merged 2 commits into
twbs:v5-devfrom
Kevinjohn:fix-sidebars-dropdown-focus-outline
Oct 12, 2026
Merged

julien-deramond merged 2 commits into
twbs:v5-devfrom
Kevinjohn:fix-sidebars-dropdown-focus-outline

Conversation

@Kevinjohn

@Kevinjohn Kevinjohn commented Jul 19, 2026 •

Copy link
Copy Markdown
Contributor

Description

Restores the default focus outline for dropdown toggles in the sidebars example.

Motivation & Context

The sidebars example removed outlines from every .dropdown-toggle, including focused dropdown triggers. The headers example already limits the same outline reset to .dropdown-toggle:not(:focus), preserving the keyboard focus indicator.

Expected: focused sidebar dropdown triggers retain a visible outline.
Actual: focused sidebar dropdown triggers have outline: 0 with no replacement style.

This updates the sidebars selector to match the existing headers example pattern.

Type of changes

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

Checklist

  • I have read the contributing guidelines
  • My code follows the code style of the project (using npm run lint)
  • My change introduces changes to an example
  • I have updated the example accordingly
  • I have added tests to cover my changes
  • All new and existing tests passed

Live previews

Related issues

None.

Checks

  • git diff --check
  • npm exec -- prettier --config site/.prettierrc.json -c site/src/assets/examples/sidebars/sidebars.css
  • npm run docs-build

@julien-deramond julien-deramond added css Sass sources or compiled CSS examples The examples in the docs v5 v5, the v5-dev branch labels Jul 20, 2026
@julien-deramond julien-deramond added accessibility Keyboard, screen readers, contrast, ARIA bug Something does not work as documented labels Oct 10, 2026
@julien-deramond
julien-deramond marked this pull request as ready for review October 12, 2026 16:59
@julien-deramond
julien-deramond requested a review from a team as a code owner October 12, 2026 16:59

@julien-deramond julien-deramond left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks! This fixes a real keyboard accessibility gap: the three dropdown triggers in the Sidebars example are focusable links and currently show no focus indicator (WCAG 2.4.7). The selector is the same one the Headers example already uses, so the two examples are consistent. LGTM.

@julien-deramond julien-deramond added the no-backport-to-v6 Merged on v5, not for v6 label Oct 12, 2026
@github-project-automation github-project-automation Bot moved this to Needs review in v5.4.0 Oct 12, 2026
@github-project-automation github-project-automation Bot moved this from Needs review to Ready to merge in v5.4.0 Oct 12, 2026
@julien-deramond
julien-deramond merged commit 7c489db into twbs:v5-dev Oct 12, 2026
7 checks passed
@github-project-automation github-project-automation Bot moved this from Ready to merge to Done in v5.4.0 Oct 12, 2026
@mdo mdo removed this from v5.4.0 Nov 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

accessibility Keyboard, screen readers, contrast, ARIA bug Something does not work as documented css Sass sources or compiled CSS examples The examples in the docs no-backport-to-v6 Merged on v5, not for v6 v5 v5, the v5-dev branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants