Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Datagrid Header Sort Tooltip #9605

Merged
merged 1 commit into from
Jan 24, 2024
Merged

Conversation

fzaninotto
Copy link
Member

@fzaninotto fzaninotto commented Jan 23, 2024

Problem

In a <Datagrid>, the header of sortable columns has a tooltip that is the same for all columns: "Sort". It's not explicit enough, and it's even confusing for screen readers.

Screenshot 2023-12-22 at 09 51 13

Solution

Reuse the title logic from <SortButton>, which already solves this problem.

image

Closes #9541

## Problem

In a `<Datagrid>`, the header of sortable columns has a tooltip that is the same for all columns: "Sort". It's not explicit enough, and it's even confusing for screen readers.

## Solution

Reuse the title logic from `<SortButton>`, which already solves this problem.

Closes #9541
@@ -272,7 +272,9 @@ describe('<Datagrid />', () => {
it('should display a message when there is no result', () => {
render(
<Wrapper listContext={{ ...contextValue, data: [], total: 0 }}>
<Datagrid />
<Datagrid>
<TitleField />
Copy link
Member Author

Choose a reason for hiding this comment

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

unrelated change, but the missing child was causing a warning in the test output

@slax57 slax57 added this to the 4.16.8 milestone Jan 24, 2024
@slax57 slax57 merged commit 1e6c94a into master Jan 24, 2024
11 checks passed
@slax57 slax57 deleted the fix-datagrid-column-header-tooltip branch January 24, 2024 09:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
RFR Ready For Review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

All the row headers on List Component are called "Sort"
2 participants