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.
Add summary attribute to tables
Comment | File | Size | Author |
---|---|---|---|
#7 | 868972-table-summary.patch | 5.99 KB | merlinofchaos |
#4 | screen-capture-55.png | 133.53 KB | mgifford |
#4 | screen-capture-56.png | 223.96 KB | mgifford |
#1 | 868972-table-summary.patch | 3.82 KB | dawehner |
Comments
Comment #1
dawehnerIt would make sense for grid, too.
Comment #2
mgiffordOk, this looks good when I review the code, but I want to apply it to my sandbox and need to know what version of the code I'm applying it against.
Comment #3
dawehnerIt's filled against views 3.x but i guess it should work for 2.x, too.
Comment #4
mgiffordOk, I'd recommend a bit of a change in the patch in this line:
as you don't want a blank tag if it isn't required.
I added it to a D6 sandbox here http://drupal6.dev.openconcept.ca/en/table
And ran into two problems. One was that I noticed that there was an empty <h2> tag. but that's another issue for views accessibility not to be addressed here.
Big issue here was that the summary table was blank in the output.
I looked at the code briefly to figure out why, but came up blank.
EDIT: First image shows the form as it is displayed in the views admin with the summary field added. The 2nd image however displays the empty summary text & empty header ( all marked up with http://wave.webaim.org )
Comment #5
Everett Zufelt CreditAttribution: Everett Zufelt commentedWhat tables? Tables within the Views UI, tables generated by views? What functionality does this patch attempt to add?
It is difficult for people to test without knowing expected behaviors and output.
Comment #6
dawehnerThis issue is about tables generated by views.
The goal of the issue is that the page developer/administrator can set a summary attribute for tables. Does this help?
Comment #7
merlinofchaos CreditAttribution: merlinofchaos commentedMade mgifford's change and committed. Doesn't apply to 7.x so needs porting.
I couldn't reproduce the issue mgifford saw. My best guess is that the view wasn't actually fully saved, so the changes weren't being shown on the real view. Changing the summary worked correctly for me in preview.
Actual patch applied is attached.
Comment #8
mgiffordThanks, this is great to hear. I don't have time to look at this now, but will try to do so and get back to you if I can replicate the problem.
Comment #9
dawehnerPorted.
Tested with both grid and table.