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: The featured image should provide information about the featured image #59830

Open
afercia opened this issue Mar 13, 2024 · 0 comments
Labels
[Feature] Data Views 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). [Package] Edit Site /packages/edit-site [Type] Bug An existing feature does not function as intended

Comments

@afercia
Copy link
Contributor

afercia commented Mar 13, 2024

Description

In the data views, the featured image should provide information about what the image is. Instead, it is actually placed within a button that is labeled with the page title (with the exception of the List layout)

It's worth reminding that an aria label attribute overrides any content so that the button accessible name is actually the page title. The image within the button is compeltely ignored even when it has an alt text. Basically this markup:

<button aria-label="Test page" ...
    <img alt="Farmer boy" ...
    ...

does not provide the correct information and I would say not even the correct functionality.

Table layout

  • There's no info at all about the actual image. As said, aria-label overrides any content. As such, the 'Featured image' column actually contains buttons with the post title and nothing else. This defeats the purpose of using a table, where each column should contain the data type identified by the column header.
  • I'm not sure why this has to be a button in the first place. Clicking the button switches the editor to edit mode for that page. As a user, this is not what I would expect when clicking the featured image preview of a page.
  • Worth noting also the pages without featured image will have a button in the 'Featured image' column. The button is smpty and will look like a grey box. It is still labeled with the page title.

Screenshot:

Screenshot 2024-03-13 at 14 43 55

Grid layout

Similar to the above case. There is no table but the information about the featured image is missing because the button aria-label overrides any content.

List layout

Similar to the above but the button is acctually a div element with a role button <div role="button" .... It doesn't use an aria-label so that its accessible name is determined by its content: featured image alt text (if any), page title, author and publish status. That's really too much information to label a button, and it gets announced by screen readers all together:

Screenshot 2024-03-13 at 14 58 25

Visually, it would be the equivalent of a button with all that info used as text, which isn't the best way to use a button. Example:

Screenshot 2024-03-13 at 15 09 15

Step-by-step reproduction instructions

  • Go to the Site editor > Pages > Manage all pages
  • In the View options menu, enable the Featured image field.
  • Inspect the source of all the thee Layouts: Table, Grid, and List.
  • Observe the featured image is a button and its labeling is less than ideal.

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). [Package] Edit Site /packages/edit-site [Feature] Data Views Work surrounding upgrading and evolving views in the site editor and beyond labels Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Data Views 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). [Package] Edit Site /packages/edit-site [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

No branches or pull requests

1 participant