Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Beside #868972: summary attribute for tables what can be done to improve the output of views.
Some suggestions i think could help:
- Add a way to manually add id/scope attribute to the header
- Add a way to manually add scope attribute to the table output
- Adding a caption textfield to the table?
- Even
<td headers="step jenny birthday">Feb 12</td>
could be perhaps made possible if you allow tokens to use
See http://webaim.org/techniques/tables/data
Please tell what you think about this suggestions.
Comment | File | Size | Author |
---|---|---|---|
#18 | views-accessibility-869332-18.patch | 2.82 KB | Andrew Answer |
|
Comments
Comment #1
mgiffordThere are some issues here that are mentioned that are useful:
#716310: Views Accessibility
Given the amount that content is reloaded on the page however I do think we should think carefully about adapting WAI-ARIA to pass along more meaning to the browser.
Comment #2
mgiffordThere's also #795422: Views Results in Labels & Not Headings
Comment #3
mgiffordThere is a lot of text that doesn't have sufficient definition associated with it to allow a screen reader to understand context:
http://www.w3.org/TR/2007/WD-WCAG20-TECHS-20070517/Overview.html#F63
EDIT: The screen capture included here provides the view WebAim's WAVE tool provides of the admin page with lots of yellow links to all of the redundant text to Edit/View links. WebAIM has a nice firefox plugin that really helps evaluate admin areas of web pages that you don't want to make public.
Comment #4
mgiffordThere are missing labels in form elements like the display select list here.
EDIT: A select dropdown for Views. WebAIM is again marking it up as a form without an associated label.
Comment #5
Everett Zufelt CreditAttribution: Everett Zufelt commentedGlad to see interest and effort going into Views accessibility. It would be helpful to me, if not others like MerlinOfChaos, if we could have a bit more clarity about problems and solutions without only linking to an external resource. It would be particularly helpful, since we're on the topic of accessibility, if we could provide some type of textual description of screen-shots, as I currently have absolutely no idea what is being discussed.
If this is an accessibility barrier then this can likely be marked as a bug.
Thanks
Comment #6
mgiffordThanks for commenting here Everett. Sorry for not providing descriptions of the screen captures. I often neglect them just for lack of time, sorry. I'll edit the thread above and list them.
Another error to mention here is that there are blank header tags being output from Views. In general it's bad form to send empty tags to the browser, but especially with headings & links.
Comment #7
esmerel CreditAttribution: esmerel commentedadding tag
Comment #8
Sheldon_Parnes CreditAttribution: Sheldon_Parnes commentedThis looks like a set of solutions in search of a problem. It looks like the author wants to add additional data or new methods of adding data to objects but never really explains what the benefits are. I am echoing Everett Zufelt here.
I would also push this to 7.x or postpone do to the lack of activity on this issue.
Comment #9
mgiffordI'm fine with this going into 7.x, but at the time development was done on 6.x & then forwarded. I'm working on the 7.x-3.0-rc1. I've done just some evaluation with the WAVE Firefox Toolbar.
Looking at popular/today the HTML output presently looks like:
I don't see how to manipulate the headers with Vies in order to follow the best practices outlined by http://webaim.org/techniques/tables/data
Comment #10
Everett Zufelt CreditAttribution: Everett Zufelt commentedOT @Sheldon_Parnes
I would be careful "echoing" someone who 1. doesn't have a clue who you are, and 2. might not agree with what you are "echoing".
Comment #11
mgiffordMarking this a duplicate of #864006: Improve table semantics by adding scope or headers/id attributes
Comment #12
mgiffordSimple back-port of improvement in Views D8 Core #864006: Improve table semantics by adding scope or headers/id attributes. Does not include Grid. Since it's a different project, simply re-opening this issue.
Comment #13
dawehnerCan we try to avoid that much logic in templates?
Comment #14
mgiffordWould be neater to combine
print 'class="'. $header_classes[$field]
&print 'id="'. $header_id[$field]
in a common variable...Is this more of what you are looking for? It's definitely messy as it is in the patch in #12.
Comment #15
Chris Matthews CreditAttribution: Chris Matthews commentedThe 5 year old patch in #12 to theme.inc and views-view-table.tpl.php does not apply to the latest views 7.x-3.x-dev.
Comment #16
Andrew Answer CreditAttribution: Andrew Answer as a volunteer commentedPatch rerolled.
Comment #17
Andrew Answer CreditAttribution: Andrew Answer as a volunteer commentedFix.
Comment #18
Andrew Answer CreditAttribution: Andrew Answer as a volunteer commentedPatch rerolled/fixed after last commits.