Adding scope="col" to table headers provides semantic meaning for screen readers and other Assistive Technology. See an example here: http://dev.w3.org/html5/alt-techniques/#hag21

Related issue for Views 7.x-3.x: #864006: Improve table semantics by adding scope or headers/id attributes

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dcmouyard’s picture

Status: Active » Needs review
FileSize
666 bytes

Here's the patch.

dawehner’s picture

I have no idea of accessiblity but #864006-43: Improve table semantics by adding scope or headers/id attributes also agrees with using that.

Just for sanity we might should wait on that issue until #1773832: Replace usage of drupal_attributes, refactor to use Attribute better is in.

mgifford’s picture

+1

It's a great light weight option for simple tables like what Drupal produces. Will be excellent to have this in core.

I think that this will mean that all data tables on the admin side (users, watchdog, etc) will come with basic scope definitions too.

CB’s picture

Agreed. Quick and valuable enhancement.

mgifford’s picture

Status: Needs review » Reviewed & tested by the community

this is a quick and simple enhancement. don't think it needs any further discussion.

catch’s picture

Status: Reviewed & tested by the community » Fixed

I ate some raw garlic then committed the patch. Thanks!

mgifford’s picture

You'll be safe against vampires now! Thanks Catch.

Any reason not to back-port this?

dawehner’s picture

Project: Drupal core » Views (for Drupal 7)
Version: 8.x-dev » 7.x-3.x-dev
Component: views.module » Miscellaneous

I don't see any reason not to.

dawehner’s picture

Status: Fixed » Patch (to be ported)

.

Valentine94’s picture

Issue summary: View changes
Status: Patch (to be ported) » Needs review
FileSize
590 bytes

Backport for Drupal 7

mgifford’s picture

Status: Needs review » Reviewed & tested by the community
FileSize
55.03 KB

Simple patch. Looks good to me.

dawehner’s picture

Status: Reviewed & tested by the community » Fixed

Thank you for the quick feedback. Committed and pushed to 7.x-3.x

  • dawehner committed 4317c5e on 7.x-3.x authored by Valentine94
    Issue #1831162 by dcmouyard, Valentine94: Tables generated by Views need...

Status: Fixed » Closed (fixed)

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