Data views: The featured image should provide information about the featured image #59830
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
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:
does not provide the correct information and I would say not even the correct functionality.
Table layout
Screenshot:
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: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:
Step-by-step reproduction instructions
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
The text was updated successfully, but these errors were encountered: