Skip to content

Fix keyboard focus not reaching DataGrid column headers#791

Open
wnvko-msft wants to merge 1 commit into
microsoft:mainfrom
wnvko-msft:mvenkov/fix-focus-on-column-header-3018981
Open

Fix keyboard focus not reaching DataGrid column headers#791
wnvko-msft wants to merge 1 commit into
microsoft:mainfrom
wnvko-msft:mvenkov/fix-focus-on-column-header-3018981

Conversation

@wnvko-msft

@wnvko-msft wnvko-msft commented Jun 29, 2026

Copy link
Copy Markdown

WPF Gallery → Collections → DataGrid: while navigating with the keyboard, focus skipped the column headings, so keyboard-only users could not reach them. DataGridColumnHeader is non-focusable by default.

This adds a ColumnHeaderStyle on the sample DataGrid that sets Focusable=True (based on the Fluent default style), so the column headings receive keyboard focus during navigation. The displayed XamlCode is updated to match.

Testing: Navigate to Collections → DataGrid and Tab/arrow into the table - focus now lands on the column headers.

Microsoft Reviewers: Open in CodeFlow

@dipeshmsft dipeshmsft added the Accessibility An issue related to accessibility enhancements or blockers. label Jul 1, 2026
@dipeshmsft

Copy link
Copy Markdown
Member

The change looks good. However, is there a way we can make the focus visual around the header more visible. As of now, it is getting clipped, and the A11y team will push back for this.

image

@himgoyalmicro himgoyalmicro changed the title Fix keyboard focus not reaching DataGrid column headers (3018981) Fix keyboard focus not reaching DataGrid column headers Jul 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Accessibility An issue related to accessibility enhancements or blockers.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants