Make WordPress Core

Opened 9 years ago

Closed 9 years ago

Last modified 8 years ago

#35187 closed defect (bug) (fixed)

Remove title attributes: the terms List Table

Reported by: afercia's profile afercia Owned by: afercia's profile afercia
Milestone: 4.5 Priority: normal
Severity: normal Version: 4.4
Component: Administration Keywords: has-screenshots, has-patch, commit, title-attribute
Focuses: ui, accessibility Cc:

Description

See related #24766 and all the following tickets about title attributes.

In the terms List Table, used for Tags, Categories, and custom taxonomies, the main item link has a title attribute that contain the actual action ("Edit"). It should be replaced with an aria-label attribute.

Please notice when a category is a sub-category, the "pad mdash" is displayed in the title attribute and shouldn't be there.

https://cldup.com/NY5EMez9QP.png

Additionally, as already done in [33087], all the row action links would need to provide better context for assistive technologies. These links text should be expanded using aria-label attributes to reference the item title, so they make sense even when read out of context (this should be done for all the List Tables row action links).

Attachments (4)

35187.patch (2.7 KB) - added by afercia 9 years ago.
35187.2.patch (3.0 KB) - added by afercia 9 years ago.
35187.3.patch (3.0 KB) - added by afercia 9 years ago.
35187.4.patch (3.1 KB) - added by afercia 9 years ago.

Download all attachments as: .zip

Change History (17)

@afercia
9 years ago

#1 @afercia
9 years ago

  • Keywords has-patch added
  • Owner set to afercia
  • Status changed from new to assigned

First pass. Wondering if the "View" link should say that it points to the taxonomy archive so "View {term name} archive" instead of just "View {term name}".

#2 @afercia
9 years ago

Looking back at this, I have a doubt about the aria-label on the main item link. Since we're inside a column with a header that says "Name", maybe the item should be announced by screen readers with just the item name. The current patch prepends the "Edit" action instead, see screenshot:

https://cldup.com/bDh6lCLi_3.png

On the other hand, omitting the "Edit" action and using just the name wouldn't make clear the link points to the edit screen. A bit tricky to solve, and it's related to almost all the list tables so before creating new tickets I'd like to hear the accessibility team opinion and feedback :)

Worth noting this doesn't happen on the Plugins list table because the plugin names are not linked so the difference between the item name and the action links it's very clear.

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


9 years ago

#4 @joedolson
9 years ago

From a usability standpoint, I feel like having aria-label = 'Edit {name}' is clearer; the fact that the column is titled "Name" doesn't seem like it should cause major confusion; knowing that this is a link to edit, rather than a link to view is valuable.

I think that the most important thing is making it clear what the target of the link will be, and that should trump the largely conceptual relationship of column title to contents.

#5 @afercia
9 years ago

@joedolson thanks. See also #33002 and #32254. I'd be tempted to remove the link from the item name (see for example the Plugins table) but that would need some discussion I guess :) What about moving "Edit" after the name? Something like:

Name column 2
"sub" (Edit) link
Edit "sub" link | Quick edit "sub" inline button | Delete "sub" button | View "sub" link

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


9 years ago

#7 @afercia
9 years ago

Discussed a bit in today's accessibility weekly chat. While there are probably better solutions, thinking for example at the Plugins table where the item name has no link so there are no duplicated links and everything is clearer for assistive technologies, decided to stick to the original goal of this ticket and just remove the title attributes. Further improvements will be evaluated with time and will have their own tickets.

About the aria-label for the linked item name a slight preference was expressed for moving "Edit" at the end of the string, taking into consideration that screen readers will announce the column header saying "Name", something like:

Name column 2
"My nice item with a very long name" Edit link

would be clearer than:

Name column 2
Edit "My nice item with a very long name" link

This should apply to all the similar links in the list tables in the admin.

@afercia
9 years ago

#8 @afercia
9 years ago

Refreshed patch. Aria labels used for the links:

[myterm] (Edit)
Edit [myterm] | Quick edit [myterm] inline | Delete [myterm] | View [myterm] archive on your site

Any thoughts more than welcome.

@afercia
9 years ago

#9 @afercia
9 years ago

Refreshed patch to simplify the "View" link and remove "on your site". Forgot to mention this patch also adds translator comments and splits long lines for better readability.

@afercia
9 years ago

#10 @afercia
9 years ago

  • Keywords commit added

Refreshed patch, uses sprintf() to build the links strings.

Last edited 9 years ago by afercia (previous) (diff)

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


9 years ago

#12 @afercia
9 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

In 36265:

Accessibility: Remove title attributes from the Terms list table.

Fixes #35187.

#13 @afercia
8 years ago

  • Keywords title-attribute added
Note: See TracTickets for help on using tickets.