Make WordPress Core

Opened 2 years ago

Closed 2 years ago

#56824 closed defect (bug) (fixed)

SVGs missing title and description in WordPress dashboard

Reported by: viralsampat's profile viralsampat Owned by: audrasjb's profile audrasjb
Milestone: 6.2 Priority: low
Severity: normal Version: 6.0
Component: Administration Keywords: good-first-bug has-patch commit
Focuses: accessibility Cc:

Description

Hello Team,

I have started working on WordPress accessibility. I WordPress 6.0.2 admin dashboard and found accessibility changes.

Here, I have attached its screenshots:
Screenshots:

https://share.cleanshot.com/0pTcgVSoi39eYjeGhKx2

URL: your-site-path/wp-admin/index.php
WordPress version: 6.0.2

Attachments (1)

56824.diff (1.9 KB) - added by elifvish 2 years ago.

Download all attachments as: .zip

Change History (10)

#1 @sabernhardt
2 years ago

#56823 was marked as a duplicate.

#2 @sabernhardt
2 years ago

  • Component changed from General to Administration
  • Focuses accessibility added

#3 @audrasjb
2 years ago

  • Keywords close reporter-feedback added
  • Type changed from enhancement to defect (bug)
  • Version 6.0.2 deleted

Hello and thanks for the ticket :)

Concerning the three images:

  1. 6.0 illustration image doesn't need any alt text. It is hidden from assistive technologies using aria-hidden.
  2. Same goes for the site health score circle.
  3. Activity widget (comments): alt is empty, which is fine since it doesn't contain any relevant info. Adding an alt with info about the commenter would be redundant with the text displayed near the image.

Everything look good to me at a glance :)

This ticket was mentioned in Slack in #accessibility by ryokuhi. View the logs.


2 years ago

#5 @ryokuhi
2 years ago

  • Keywords needs-patch good-first-bug added; close reporter-feedback removed
  • Milestone changed from Awaiting Review to 6.2
  • Priority changed from normal to low
  • Summary changed from Accessibility image alt text empty & SVG missing title and description on wordpress dashboard to SVGs missing title and description in WordPress dashboard
  • Version set to 6.0

We reviewed this ticket today during the Accessibility Team's weekly bug scrub.

Regarding the alternative text for Gravatars in the Recent Comments widget, I agree with @audrasjb that it should stay empty. From the point of view of accessibility, as he said, the alt text in these cases wouldn't add much value, since users normally use their pictures for Gravatars. From the technical point of view, I'm not sure it makes sense to implement a mechanism to add in WordPress the alternative text of an image hosted on an external website.

Regarding the two SVGs, some automated tools mark such elements with errors because these SVGs have the role="img" attribute: despite being hidden to assistive technologies using aria-hidden="true", automated tools still understand them as images and expect alternative texts.

While this is not a priority, removing role="img" would solve the issue, and would be a very nice opportunity for someone new to start contributing to WordPress.

@elifvish
2 years ago

#6 @elifvish
2 years ago

  • Keywords has-patch added; needs-patch removed
  • Version changed from 6.0 to 6.0.2

#7 @elifvish
2 years ago

  • Version changed from 6.0.2 to 6.0

#8 @audrasjb
2 years ago

  • Keywords commit added

Thanks for the patch, it looks good to me.
Marking for commit.

By the way, @elifvish please note that tickets marked as good-first-bug should be kept for new contributors, as it is a very good way to onboard new people to WordPress Core.

#9 @audrasjb
2 years ago

  • Owner set to audrasjb
  • Resolution set to fixed
  • Status changed from new to closed

In 54739:

Administration: Remove role="img" from decorative SVG images.

This changeset removes role="img" attribute from two decorative images: despite being hidden to assistive technologies using aria-hidden="true", automated tools still understand them as images and expect alternative texts.

Props viralsampat, sabernhardt, audrasjb, ryokuhi, elifvish.
Fixes #56824.

Note: See TracTickets for help on using tickets.