Skip to content

[EuiTable]: Can we add a visual indicator of sortable columns? #7610

Closed

Description

@1Copenut

Is your feature request related to a problem? Please describe.
While auditing the Security Serverless project, we discovered several tables that had multiple sortable columns. These columns look identical to non-sortable ones, which could slow users down or cause confusion. I'd like to consider adding a visual indicator (bold text, semi-transparent icon, etc.) to distinguish sortable columns. Screen shot attached

Describe the solution you'd like
I would like to see a visual indicator and hear an aural indicator that lets me know which columns I can sort on an EuiTable.


Screenshot 2024-03-21 at 1 59 11 PM

Activity

  1. added
    design decision
    on Mar 25, 2024
  2. JasonStoltz commented on Mar 25, 2024

    @JasonStoltz
    Contributor

    @MichaelMarcialis This sounds like a reasonable request, I could see that users might find this confusing. Do you have any input on this or thoughts on how we might improve this UI?

  3. MichaelMarcialis commented on Apr 1, 2024

    @MichaelMarcialis
    Contributor

    @JasonStoltz: Two common patterns that immediately come to mind are:

    1. Add a neutral up/down icon adjacent to headings that can be sorted (perhaps in a subdued color). It appears we actually already have a sortable icon for just such a task. Here's a basic example found in the wild:

    image

    1. Provide a visual typographic offset to indicate sortable headings are different. @1Copenut already mentions text weight above (bold vs. regular). Another option would be to give it a hyperlink styling (i.e. underline decoration), which is very timely considering recent discussions on underlined links in EUI.

    Personally, I lean toward the first direction because it is likely to be clearer to users what action clicking will perform. By offering an ever-present icon for sortable columns, we also avoid header text jumping around if/when users sort a right-aligned column. If ya'll agree, I'd be happy to put together some quick mockups if needed. Thoughts?

  4. added
    low hanging fruit
    on Apr 2, 2024
  5. cee-chen commented on Apr 2, 2024

    @cee-chen
    Contributor

    ++ to option 1 / mockups with the sortable icon!

  6. JasonStoltz commented on Apr 4, 2024

    @JasonStoltz
    Contributor

    +1 to the first option as well

  7. 1Copenut commented on Apr 4, 2024

    @1Copenut
    ContributorAuthor

    I'm +1 to the first option (use of icons). The visual indication is a clear way to differentiate what's sortable from what's sorted and what's not active. We should figure out the language we want to use for screen reader messaging. We'll need messages for sortable, sorted ascending, and sorted descending.

    Looking forward to having this enhancement!

  8. cee-chen commented on Apr 5, 2024

    @cee-chen
    Contributor

    I'm currently already neck deep in tables so figured I might as well mock something up while here. How do we all feel about something like this?

    sortable

  9. 1Copenut commented on Apr 5, 2024

    @1Copenut
    ContributorAuthor

    I like this mockup @cee-chen. The double-arrow is a good way to indicate potential, and the single pointing arrow applied sort. The potential sort will need a 3:1 contrast ratio to the background to meet SC 1.4.11: Non-text Contrast (Level AA), so the light gray will probably need darkened slightly. That's the only accessibility consideration aside from the clear accessible labels for the three states.

  10. self-assigned this
    on Apr 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

design decisionlow hanging fruit

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions