Skip to content

fix(controls): Prevent keyboard focus on hidden buttons in ContentDialog#1565

Merged
pomianowski merged 2 commits intolepoco:mainfrom
apachezy:fix/contentdialog-buttons
Nov 8, 2025
Merged

fix(controls): Prevent keyboard focus on hidden buttons in ContentDialog#1565
pomianowski merged 2 commits intolepoco:mainfrom
apachezy:fix/contentdialog-buttons

Conversation

@apachezy
Copy link
Contributor

@apachezy apachezy commented Nov 8, 2025

Pull request type

Please check the type of change your PR introduces:

  • Update
  • Bugfix
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation content changes

What is the current behavior?

When primary/secondary buttons in ContentDialog have no content, they are only visually hidden by setting their parent grid column width to zero. However, the buttons themselves remain accessible via Tab focus, can still be activated by Enter/Space keys, and may be detected by screen readers and other assistive tools.

Issue Number: N/A

What is the new behavior?

  • Primary/secondary buttons with no content are now properly disabled and collapsed
  • Buttons without content can no longer receive focus via Tab navigation or be activated by Enter/Space keys
  • Buttons without content are now properly ignored by assistive tools

@apachezy apachezy requested a review from pomianowski as a code owner November 8, 2025 11:36
@github-actions github-actions bot added controls Changes to the appearance or logic of custom controls. styles Topic is related to styles PR Pull request release labels Nov 8, 2025
@pomianowski pomianowski merged commit fbd92cc into lepoco:main Nov 8, 2025
2 checks passed
@apachezy apachezy deleted the fix/contentdialog-buttons branch November 8, 2025 18:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

controls Changes to the appearance or logic of custom controls. PR Pull request release styles Topic is related to styles

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants