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

Data views: Make the links look like links #59176

Open
afercia opened this issue Feb 19, 2024 · 7 comments
Open

Data views: Make the links look like links #59176

afercia opened this issue Feb 19, 2024 · 7 comments
Assignees
Labels
[Feature] DataViews Work surrounding upgrading and evolving views in the site editor and beyond [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). Needs Design Feedback Needs general design feedback. [Type] Bug An existing feature does not function as intended

Comments

@afercia
Copy link
Contributor

afercia commented Feb 19, 2024

Description

See related #59175

In the data views, the title of each item is actually a link to the item details. For example in the case of the Pages list the page title is a link to the page editing view.

However, the title text is a gray text. It looks like normal, non-interactive, text. There is no visual indication that it's a link.
Moreover, when hovering a row, the title text looks like the checkbox label. As a user, I would expect that clicking that text selects the checkbox.

An inclusive user interface needs to be predictable and self-explanatory. Links must look like links.

Screenshot 2024-02-19 at 14 02 16

Step-by-step reproduction instructions

  • Go to Site editor > Pages > Manage all pages.
  • Go to Site editor > Pages > choose 'Table' or 'Grid' from the layout options.
  • Observe the page titles look like normal gray text.

Screenshots, screen recording, code snippet

No response

Environment info

No response

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

@afercia afercia added [Type] Bug An existing feature does not function as intended [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). Needs Design Feedback Needs general design feedback. [Feature] DataViews Work surrounding upgrading and evolving views in the site editor and beyond labels Feb 19, 2024
@afercia afercia self-assigned this Feb 20, 2024
@afercia
Copy link
Contributor Author

afercia commented Feb 20, 2024

As a user, I would expect that clicking that text selects the checkbox.

This is even more true in the 'Grid' view, where the item title really looks like the checkbox label. See screenshot below.
As a user, I would expect that clicking that text selects the checkbox. Instead, I'm unexpectedly brought to the editing view.

Screenshot 2024-02-20 at 10 09 48

@afercia
Copy link
Contributor Author

afercia commented Feb 20, 2024

Similarlym in the Patterns grid view, the text on the right of the checkboxes looks like the checkbox label.
Instead, it's a button. Clicking the button brings to the editing view.
Buttons should look like buttons. I wonder why these are buttons and not links in the first place though.

Screenshot 2024-02-20 at 14 41 48

@afercia
Copy link
Contributor Author

afercia commented Feb 20, 2024

Question: why the title is a link in the Pages cards and instead it's a button in the Patterns cards?

Pages:

<Link
params={ {
postId: item.id,
postType: item.type,
canvas: 'edit',
} }
>
{ decodeEntities( item.title?.rendered ) ||

Patterns: it's a button element with 'link' variant but it usss useLink under the hood and it behaves like a link, integrated with the routing mehcanism. Am I missing something?

const { onClick } = useLink( {
postType: item.type,
postId: isUserPattern ? item.id : item.name,
categoryId,
categoryType: isTemplatePart ? item.type : PATTERN_TYPES.theme,
} );

We need to make the UI consistent not only visually, but also semantically and in terms of expected interaction.
Any technical reason for this difference? Cc @oandregal

@afercia
Copy link
Contributor Author

afercia commented Feb 20, 2024

Regarding the Grid cards, I think the current design is confusing and less than ideal both visually, semantically, and as expected interaction. Thinking it needs to be refined, made more consistent, and predictable.

Screenshot 2024-02-20 at 16 43 09

  • Although visually similar, Page and Patterns (haven't checked Templates yer) cards use a different markup for example links vs. buttons. Not sure why.
  • The control to Edit and the control to Select an item need to be clearly distinguished. WIth the current design, it's not clear at all what is select and what is edit.
  • The expectation established in the last 30 years or so for gray text on the right of a checkbox is that text to be the label of the checkbox. Instead, it's sometimes a link and sometimes a button, both bring to the edit view.

I'd like to propose to make things work as expected based on their visual appearance. More importantly, Selection and editing controls should be clearly separated.

  • Selection: The text to the right of the checkboxes should be a <label> element associated with the checkbox. This would match users expectations.
  • The card preview should be a link, not a button. It should be clearly labeled that it brings to the editing view. Ideally, on hover and focus a 'Edit' visual fedback should visually make clear the link brings to the editing view.

@afercia
Copy link
Contributor Author

afercia commented Feb 20, 2024

These descriptions and tooltips on the author and status need to be removed. As discussed in another issue, ariakit makes an incorrect usage of tooltips by making any element a description is attached to a focusable element. This makes some div elements focusable, whith is far from ideal. Tooltips should not be used for descriptions on non-interactive elements.

Screenshot 2024-02-20 at 10 24 01
Screenshot 2024-02-20 at 10 24 03

@rinkalpagdar
Copy link
Contributor

Step-by-step reproduction instructions

  • Go to Site editor > Pages > Manage all pages.
  • Observe the page titles look like normal gray text.

Couldn't able to reproduce the issue.
Image

@afercia
Copy link
Contributor Author

afercia commented Dec 17, 2024

I updated the test instructions to make it clearer to switch to the 'Table' or "Grid' layout to test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] DataViews Work surrounding upgrading and evolving views in the site editor and beyond [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). Needs Design Feedback Needs general design feedback. [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

No branches or pull requests

2 participants