At the moment $forum_topic_list_header uses a NULL for the initial column header. I ran into this when validating this page:
http://drupal7.dev.openconcept.ca/forum/1
This isn't all that complicated a fix, but I'm still not entirely certain what this column is there to do. I defined it as a type.
There should be no visual differences in this patch. Should just be an accessibility enhancement.
There is an additional issue buried in comment #66 downwards regarding what an anonymous user sees, not quite related to this issue, but updating summary so people know it's there as that is still an open issue.
Comment | File | Size | Author |
---|---|---|---|
#57 | patch-d8-forum_0001_Chrome-pre.gif | 111.18 KB | mducharme |
#57 | patch-d8-forum_0000_chrome-post.gif | 92.46 KB | mducharme |
#57 | patch-d8-forum_0002_Firefox-pre.gif | 109.74 KB | mducharme |
#57 | patch-d8-forum_0003_firefox-post.gif | 97.86 KB | mducharme |
#57 | patch-d8-forum_0005_safari-pre.gif | 83.92 KB | mducharme |
Comments
Comment #1
andypostGreat idea also I think we should change markup for headers for forum_list and maybe unify listings but this task for different issue.
Comment #2
andypostMaybe "Topic type" more reasonable title for column? And better translatable
Comment #3
mgiffordOk. And also there are no visible changes with this patch.
Comment #4
andypostLet's get commiter's review. As for me it's ready
Comment #5
Dries CreditAttribution: Dries commentedI don't really understand what 'Topic type' is -- can we think of different words to describe this? Ideally, it would be more explanatory.
Comment #6
mgiffordIt's really the forum icon column. Type isn't meaningful. Topic type isn't much better.
However, what are the forum icons (which are the only thing displayed in this column) supposed to convey?
The icons are really about forum status, right? New, Hot, Hot & New, I can't remember the others..
'Forum Status' might make more sense. Especially since the screen reader will soon be getting content too.
Comment #7
andypost@mgifford please separate "topic status" and "forum status". This confusion is all about the same icons that used for them.
If it's possible for D7 we should separate them and issue about #821672: Forum icons not accessible to screen-reader users
Really, I think that "Topic status" has more meaning, but OTOH this icon displays more "State"/Status for current user actually not "type"
Comment #8
mgiffordI haven't used the forum module much, I'm just identifying & trying to resolve an accessibility issue I noticed. I want to have some wording here, but am not all too particular as to what it is.
I'm fine with using "State" or "Status" to define the column. It's certainly more general & avoids adding confusion. Heck "State/Status" also works or for that matter "Topic or Forum State".
@andypost what best describes this column? Let me know and I'll bundle up a new patch.
Comment #9
Dries CreditAttribution: Dries commentedI agree that 'Status' is better. I'd go with just 'Status' over 'Forum status'.
Another option would be 'Activity'. That might be a bit more explanatory than just 'Status'. Like 'Status', it is not perfect, but it provides more context and direction IMO.
I'm marking this 'needs review' so we can talk about it more (if necessary) and get a reroll.
Comment #10
mgiffordRerolled with the descriptive text "Status".
We need a Drupal linguist or something. It really doesn't matter to me if it's Activity or Status. Lots of other possible options too I'm sure. I asked on twitter if anyone had any opinions on the subject and only one person responded with a preference of Status. That's not much of a straw vote though to base anything on.
I hadn't noticed it was still RTBC, thanks Dries for switching it back to needs review.
Comment #11
Bojhan CreditAttribution: Bojhan commentedWait what? Why do we need a text there? Even for accessibility, the icon alt tags should be fine :S? Please we didn't just forget to place a label there, it was a conscious design decision.
Don't get to uncomfortable about empty boxes :), it really doesn't NEED an header.
Comment #12
mgiffordBlank headers for tables are an accessibility problem.
http://www.usability.com.au/resources/tables.cfm
http://www.userite.com/ecampus/lesson3/lesson3c.php
Now this is from a just from a very well respected automated accessibility validation tool, but:
http://wave.webaim.org/report?url=http://drupal7.dev.openconcept.ca/foru...
So yes, it's safe to say that it does need a header for accessibility.
Comment #13
andypostMaybe better join this cells and type title with padding?
The empty cell looks really ugly, most of forums are make a padding for Icons
Comment #14
mgiffordThat should be fine. There is a problem with some older versions of Jaws.
http://dev.opera.com/articles/view/creating-accessible-data-tables/
http://www-03.ibm.com/able/guidelines/web/webtableheaders.html
Now there is another alternative, but I don't think it's possible without a great deal more work.
This is what is being spit out now:
However, the problem is largely that you have a blank table header cell. If that were just a table data cell I don't think it would be a problem:
So is it possible to use http://api.drupal.org/api/function/theme_table/7 o that Topic, Replie & Last reply columns are still properly associated as <th> cells but that the blank one is a <td>?
Comment #15
andypostAre you sure that the problem caused by empty TH? I see no reason to change it to TD in THEAD section
Comment #16
Bojhan CreditAttribution: Bojhan commented@mgifford No offense, but a link with a very long document is very hard for me or anyone really to parse, so I would love these discussions to have some more grounding then "doesn't validate" ohh is needed for "accessibility".
I dont care so much for the table header as for the visual spacing - as long as we can retain that I am fine going with an alternative direction. But having a table header, that basically adds no value for visual users to me sounds rather silly trade off, if we can work around it - after all clarity and simplicity also comes from not-showing unnecessary information.
Comment #17
mgifford@Bojhan I have provided plenty of external references on this subject. You have not. It would really help the entire Drupal community if you did start referencing some external documents to validate your position. At the very least it would allow us to read up and have a better understanding of why you're fighting over retaining a blank table heading <th> cell.
As I've said many times, the patches provided do not alter the visual impact of the page. The benefit is entirely for screen readers who need to be able to better navigate through data tables & for those who need to have websites that don't raise accessibility warnings when they do their best practices & attempt to use automated tools to check for accessibility problems.
@andypost - I don't know that switching the blank header to a TD will resolve the problem. There are other instances where there are blank cells available in examples of accessible data tables, but these are always listed as TD's & not TH's. I haven't tested this to see if TD provides any enhancement to screen readers. I'm not even sure that it's technically possible with Drupal to have one TD cell in a row of TH's.
However, I wanted to throw this out there as an option so that folks could consider it if the patch in #10 provides a problem for some reason. If it were technically possible for Drupal's tables to do this it might be better.
However, I've really seen any reason why there is objection to what was proposed in #10. There might be better ways to approach this, but I see no problems with simply populating that cell with invisible content to help provide some context for screen readers.
Comment #18
Everett Zufelt CreditAttribution: Everett Zufelt commentedNot being someone with a cognitive or learning disability, I would imagine that having a visible header that somehow adds clarity to the content in the column may enhance accessibility.
@Bojhan
When you suggest that something was an intentional design decision can you please give some of the reasoning behind the decision.
Comment #19
Bojhan CreditAttribution: Bojhan commentedIf it adds no visual clutter, off to RTBC!
@mgifford I really do read the documents and spend quite some time learning about accessibility, trying out the different screen readers. However I am no programmer, I dont know html/css indepth to understand the implications and issues at hand with these very technical orientated documents. Hence my complaint that these documents are really hard to parse.
I felt you as an expert are far more capable to provide a short summary of the problem, without saying only that its an "accessibility" issue. When it comes to educating the community, I am sorry to say but linking off to "great" resources won't do it - I found the exact same with usability, there is a whole body of knowledge but to get your point across or expertise more often its all about providing a short insight in the accessibility/usability issue.
@Everett I am sorry, cant recall the issue that introduced this. But when we added these icons we saw there being a spacing problem putting it in its own
<td>
means we create a consistent visual space. However we should resist the urge to add description, titles and table headers to tables that only have icons - this because the icons themselves most of the time have more informational value then the header could ever provide. This case is an example of that, heaving a Status or Activity label would really not clarify the contents of that table, the actual icons (and possibly descriptions) do. Also I feel not having a header on this table creates some calm, as people don't have to reference to the table header and instead focus on the icon - this might sound weird, but its an automatic human behavior we are changing without confusing people.Comment #20
mgiffordThanks for the explanation Bojhan & for marking it RTBC again. Also for providing more background to your earlier response. It is useful to add these notes.
Comment #21
mgifford#10: forum_missing_th-3.patch queued for re-testing.
Comment #22
andypostI still sure that better to remove NULL and add
'colspan' => 2
to first header item and make css padding for first header cell.This much better to be customizible for contrib where icons could have different width!
Comment #23
mgifford@andypost - sounds good in theory. Can you re-roll the patch with the alternative.
I'm not sure how much of a window there is to push more into core though. I'd like to address this accessibility issue, but if we can also make it more flexible for designers that would be a big bonus. Just don't want to miss the window to get this change into core.
Comment #24
sun1) Ugh. Does this really work in all browsers? I would have assumed that we'd need a SPAN to achieve that.
2) null should be NULL.
Powered by Dreditor.
Comment #25
sunum, to clarify, if that actually works in all browsers: awesome!
Comment #26
mgiffordOn the mac it works fine in Firefox, Chrome, Safari & Opera testing http://drupal7.dev.openconcept.ca/forum/1 which has the patch applied (the last entry).
We need someone to do some windows testing.
Comment #27
mgifford#10: forum_missing_th-3.patch queued for re-testing.
Comment #28
mgifford#10: forum_missing_th-3.patch queued for re-testing.
Comment #29
Everett Zufelt CreditAttribution: Everett Zufelt commentedBumping to D8, this can possibly be backported to 7.x.
1. There doesn't seem to be a consensus between the two proposed methods of solving the problem.
2. Sun's questions about how all browsers render the th when element-invisible has been applied has yet to be answered fully.
Comment #30
Everett Zufelt CreditAttribution: Everett Zufelt commentedStill needs x-browser testing on this.
IMO this isn't a very critical issue, the alt on the image provides context.
Comment #31
mgiffordUpdating patch from #10.
Comment #32
Bojhan CreditAttribution: Bojhan commentedI can test windows, what I am a I looking for - just XP and Windows 7, screens of the UI?
Comment #33
mgiffordWe're just trying to verify that there is no change in the Ul. It should be just fine. After enabling the forum module i just added a thread & looked here - forum/1
I've attached a mac view. It's marked up with inspect code, but looks just the same to me.
Comment #34
mgifford#31: forum_missing_th-4.patch queued for re-testing.
Comment #35
aparkening CreditAttribution: aparkening commentedWe recommend removing the icon column completely. Instead, we propose inserting contextual data inside the Topic cell within a
span
tag, such as<span>hot topic</span>
. Using the CSSbackground-image
property, the icon can then be displayed in that span.This recommendation removes the extra column, adds context to the Topic data, and allows better Forum theming.
(via Montreal Accessibility Sprint).
Comment #36
andypostidea is good, theming of forum should be changed
Comment #37
mgiffordOk, in which case, we need a patch for this issue. Should be a simple one to draw up.
Comment #38
droplet CreditAttribution: droplet commentedIt is same to #1591744: Clean up CSS and markup for status report
But which apply to frontend, I afraid it will hurt SEO.
on search result page (google) will be:
hot topic this is an apple
hot topic this is a orange
when it is not a hot topic:
warning topic this is an apple
warning topic seo is bad
Not a good idea ?
Does screen reader read "ALT" or "Title" ?
Comment #39
mgiffordI guess the SEO could affect it depending on the text. Certainly adding a ":" or something could help I suppose.
"alt" is better for screen readers. Best to not use both.
Comment #40
Everett Zufelt CreditAttribution: Everett Zufelt commentedI'm not an SEO specialist, but does Google really care about the forum listing page, or the unique content pages (articles / posts)?
Comment #41
droplet CreditAttribution: droplet commented@Everett Zufelt,
Not one know about it. (All SEO world trending to avoid any potential mistakes.)
my own experience, all listing pages have low value in search results.
Looking into the code, we already hided the texts in separated column / implement this pattern at forum listing page.
Comment #42
droplet CreditAttribution: droplet commentedComment #43
droplet CreditAttribution: droplet commentedfix the display problem when there have long title topics (more than 2 lines).
forum-listing-better.patch removed DIV wrapper of $topic->created. maybe out of this issue scope. so im also attached min.patch.
Comment #44
andypostForum should change it's theme|preprocess and css more than this, see #1217002: Clean up the CSS for Forum module
This should be changed to more short .forum .topic
I think core should not use direct tags.
is there a reason for .icon prefix at all?
Comment #45
droplet CreditAttribution: droplet commented#1217002 is still open. If you're agreed, I would like to fix CSS problem there. and this is mainly fixing accessibility issue. It is more easier to get things move forward.
Anyway, attached a new patch.
Comment #46
andypostMakes a lot of sense, let's get review from one of accessibility guys! +1 to commit
Comment #47
droplet CreditAttribution: droplet commentedMy bad. I added same class to td & div. minimum the changes.
Comment #48
mgifford#47: forum-listing-47.patch queued for re-testing.
Comment #49
eloivaqueWe think that there are an error with the path files in the patch #47.
We tried to change it
Comment #50
mgiffordCan you specify your changes a bit more @eloiv - the order of the files in the diff is inconsistent so it's a bit harder to compare the two.
Also not sure what the error is that you're specifying.
We'll need a screenshot & someone to verify that this has resolve the issue initially pointed out in forum/1
Comment #51
eloivaqueSorry @mgifford, it's not a error.
I simply change the paths of the files containing the patch.
Comment #52
mgiffordHere's a screenshot from an Ubuntu Firefox install as a logged in & anonymous user. Looks good to me!
Comment #53
barraponto CreditAttribution: barraponto commentedIt looks like a case for IMG + ALT. But if there's a legitimate reason not to, we could just add sprites here.
Comment #54
mgiffordI'm not opposed to sprites at all, but would like #1744838: Build a consistent, accessibile approach to using Sprites
Sprites + text hidden with element-invisible should work fine too.
Comment #55
mgiffordThis could be done by sprites, but we have a solution that works the old way. Let's run with that so we can resolve this.
Any change to using sprites could be done as a separate meta issue combining any number of images.
Comment #56
webchickCan we get a quick screenshot of the before/after visual changes with this patch?
Comment #57
mducharme CreditAttribution: mducharme commentedAttached pre and post screenshots for the latest chrome, firefox and safari on osx for forum-listing-49.patch
Comment #58
mducharme CreditAttribution: mducharme commentedupdating status
Comment #59
mducharme CreditAttribution: mducharme commentedComment #60
xjmThanks @mducharme!
Per the summary, there are no visual changes (as the screenshots show), just an accessibility improvement. I think what we want is before/after markup?
Also, something is funky with the "Add new forum topic" link when the user doesn't have permission. A + button that says "You don't have permission to do this" doesn't make any sense. Let's file a followup for that.
Comment #61
mducharme CreditAttribution: mducharme commentedEvery screenshot shows the markup below the visual. Reverting status.
Comment #62
mgifford@mducharme did you take a look when you weren't logged in and didn't have permission?
Also, what's the change in the HTML? What's the output of:
<div class="icon topic-status-<?php print $icon_class ?>" title="<?php print $icon_title ?>">
with the patch applied?
Comment #63
webchickLooks like this still needs discussion.
Comment #64
mgiffordMy bad. The HTML output is in the screen capture. I didn't read @mducharme's closely enough.
Comment #65
webchickGreat, thanks!
Committed and pushed to 8.x!
Comment #66
bjlewis2 CreditAttribution: bjlewis2 commentedFiled a followup issue as was requested in #60 #1853072: Remove forum_menu_local_tasks_alter() hack and instead add links in ForumController::build
Comment #67.0
chrischinchilla CreditAttribution: chrischinchilla commentedUpdated Issue Summary as per - http://core.drupalofficehours.org/task/1216