Make WordPress Core

#58430 closed enhancement (invalid)

Title or aria-label missing in wp_list_categories

Reported by: rtomo's profile rtomo Owned by:
Milestone: Priority: normal
Severity: minor Version: 6.2.2
Component: Taxonomy Keywords: reporter-feedback
Focuses: accessibility Cc:

Description

Hi,
I think for the accesibility, need to add title or aria-label value to the wp_list_categories() with the category name.

Change History (7)

#1 follow-up: @mukesh27
13 months ago

  • Summary changed from Title or aria-label midding in wp_list_categories to Title or aria-label missing in wp_list_categories

#2 in reply to: ↑ 1 @rtomo
13 months ago

Replying to mukesh27:
Thank you, i missed the button. :)

#3 follow-up: @sabernhardt
13 months ago

  • Component changed from General to Taxonomy

The category name is already the visible text for each link, which is more accessible than title or aria-label attributes.

#4 in reply to: ↑ 3 @rtomo
13 months ago

Replying to sabernhardt:

The category name is already the visible text for each link, which is more accessible than title or aria-label attributes.

Yes, but some checker think it's bug. PageInsight or etc. checker.
When that's not problem for accesibility close that ticket.

#5 follow-up: @joedolson
12 months ago

  • Keywords reporter-feedback added

Can you provide details of the accessibility checking errors you're getting? It may be specific to a particular usage case.

#6 in reply to: ↑ 5 @rtomo
12 months ago

Replying to joedolson:

Can you provide details of the accessibility checking errors you're getting? It may be specific to a particular usage case.

Hi,

When i'm use the wp_list_categories(), in the ul/li list items content is:

<li class="cat-item cat-item-ID"><a href="catslug">catname</a>
</li>

And the better is:

<li class="cat-item cat-item-ID"><a arial-label="catname" href="catslug">catname</a>
</li>

#7 @joedolson
12 months ago

  • Milestone Awaiting Review deleted
  • Resolution set to invalid
  • Status changed from new to closed

OK. That would not be an improvement; the aria-label in that example is a duplicate of the existing accessible name, and is unnecessary.

An aria-label should only be used if there is no visible accessible name present, and that doesn't apply in this case.

I'm going to close this as invalid; feel free to reopen if you wish to have further discussion.

Note: See TracTickets for help on using tickets.