Issue

The purpose and context of sortable table header links is not provided in an accessible manner. Also, the "Sort icon" does not convey the order of the sort (ascending vs. descending).

Success criterion 2.4.4 of WCAG 2.0 requires that:

Link Purpose (In Context): The purpose of each link can be determined from the link text alone or from the link text together with its programmatically
determined link context, except where the purpose of the link would be ambiguous to users in general

Recommendations

Provide accessible purpose for the sortable table header links.

Modify the alt attribute for the "sort icon" to "Sorted Ascending" or "Sorted Descending" depending on the sort order.

Resources

Understanding Success Criterion 2.4.4 | Understanding WCAG 2.0
- http://www.w3.org/TR/2008/NOTE-UNDERSTANDING-WCAG20-20081211/navigation-...

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mgifford’s picture

So although it duplicates title & alt tag, think this is the best expression of this need to have understandable table ordering.

Everett Zufelt’s picture

Status: Active » Needs work

This patch looks good, needs to be rerolled without the unintentional changes to theme_feed_icon() which were included.

I would say that having the properly labeled sort icon gives sufficient context to the table header links.

mgifford’s picture

Status: Needs work » Needs review
FileSize
1.76 KB

Good point on the theme_feed_icon() from a previous patch.

Everett Zufelt’s picture

Applied the patch in #3 it works to provide information about the sort order of the sorted column.

Still thinking that we need to provide more information about the purpose of each link, however, perhaps the purpose is intuitive based on the fact that they are links in the header of a data table?

mgifford’s picture

Is there a best practice out there for providing descriptive information about this type of ordering to assistive technology?

Everett Zufelt’s picture

@mgifford

The best practice is that the role of links need to be determinable by their context. This is clearly somewhat subjective. Whereas some users my realize that a link in the header of a data table is for ordering some others may not. The table header links already have the title attribute of "Sort by ". Which may imply that it is desirable to provide indication of the role of the links.

mgifford’s picture

Can we get #3 RTBC as it does provide an enhancement in accessibility to what is there now.

We can then look at a broader model for accepting and passing along additional meaning for D8. I don't think we can build out this larger piece before now and Nov 15th.

BarisW’s picture

The patch works. However, wouldn't it be better to add information to the LINK instead of the icon?

So instead of:

<a class="active" title="sort by Title" href="/drupal-head/?q=admin/content&sort=desc&order=Title">Title <img height="13" width="13" title="sort descending" alt="sort icon" src="http://localhost/drupal-head/themes/seven/images/arrow-desc.png"/></a>

make it:

<a class="active" title="sort by Title descending" href="/drupal-head/?q=admin/content&sort=desc&order=Title">Title <img height="13" width="13" title="sort descending" alt="sort icon" src="http://localhost/drupal-head/themes/seven/images/arrow-desc.png"/></a>

As far as I understood, the ALT text should describe the image, not its function. Am I wrong on this?

mgifford’s picture

The image changes, the link doesn't. The goal is to provide additional meaning and context to assistive technology. I don't think it would be wrong to add additional information to the link but it's harder to do. Adding "sort descending" to both the alt text & title of the image is a sufficient way to convey this information.

Status: Needs review » Needs work

The last submitted patch failed testing.

mgifford’s picture

Status: Needs work » Needs review
FileSize
2.05 KB

Just re-rolled this. It's a really simple addition really. Should just be RTBC'd.

BarisW’s picture

Status: Needs review » Reviewed & tested by the community
mgifford’s picture

This was first RTBC just about two weeks ago.

webchick’s picture

Status: Reviewed & tested by the community » Fixed

@mgifford and others: Pursuant to the Drupal 7 development schedule, patches around API clean-ups and feature exceptions were given priority during the period from Drupalcon to Oct. 15 (later extended to Oct. 17). Over the next month (from now until Dec. 1) is where we focus on accessibility, usability, and performance.

Anyway, this change looks fine. Committed to HEAD.

mgifford’s picture

Thanks for the clarification! Some patches haven't been written yet as they were waiting to get some already RTBC'd into core.

I was very encouraged to see Dries post: http://drupal.org/node/619258

I guess that when I looked at the Drupal 7 development schedule published in September I thought that RTBC'd code would get committed throughout. I hadn't realized that there was enough need to review other code that accessibility changes would largely be put off until November.

I can't imagine the role that you & Dries have had to play in this. Quite the huge undertaking, with each small community only really aware of their concerns.

Anyways, thanks again!

Status: Fixed » Closed (fixed)
Issue tags: -Usability, -Accessibility

Automatically closed -- issue fixed for 2 weeks with no activity.