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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

andypost’s picture

Status: Needs review » Reviewed & tested by the community

Great idea also I think we should change markup for headers for forum_list and maybe unify listings but this task for different issue.

andypost’s picture

Status: Reviewed & tested by the community » Needs review

Maybe "Topic type" more reasonable title for column? And better translatable

mgifford’s picture

FileSize
781 bytes

Ok. And also there are no visible changes with this patch.

andypost’s picture

Status: Needs review » Reviewed & tested by the community

Let's get commiter's review. As for me it's ready

Dries’s picture

I don't really understand what 'Topic type' is -- can we think of different words to describe this? Ideally, it would be more explanatory.

mgifford’s picture

FileSize
51.22 KB

It'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.

andypost’s picture

@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"

mgifford’s picture

I 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.

Dries’s picture

Status: Reviewed & tested by the community » Needs review

I 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.

mgifford’s picture

FileSize
777 bytes

Rerolled 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.

Bojhan’s picture

Wait 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.

mgifford’s picture

Blank 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.

andypost’s picture

Maybe better join this cells and type title with padding?
The empty cell looks really ugly, most of forums are make a padding for Icons

mgifford’s picture

That 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:

  <thead>
    <tr><th></th><th><a href="/forum/1?sort=asc&amp;order=Topic" title="sort by Topic" class="active">Topic</a></th><th><a href="/forum/1?sort=asc&amp;order=Replies" title="sort by Replies" class="active">Replies</a></th><th><a href="/forum/1?sort=asc&amp;order=Last%20reply" title="sort by Last reply" class="active">Last reply</a></th></tr>
  </thead>

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:

  <thead>
    <tr><td></td><th><a href="/forum/1?sort=asc&amp;order=Topic" title="sort by Topic" class="active">Topic</a></th><th><a href="/forum/1?sort=asc&amp;order=Replies" title="sort by Replies" class="active">Replies</a></th><th><a href="/forum/1?sort=asc&amp;order=Last%20reply" title="sort by Last reply" class="active">Last reply</a></th></tr>
  </thead>

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>?

andypost’s picture

Are you sure that the problem caused by empty TH? I see no reason to change it to TD in THEAD section

Bojhan’s picture

@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.

mgifford’s picture

@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.

Everett Zufelt’s picture

Not 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.

Bojhan’s picture

Status: Needs review » Reviewed & tested by the community

If 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.

mgifford’s picture

Thanks 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.

mgifford’s picture

#10: forum_missing_th-3.patch queued for re-testing.

andypost’s picture

I 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!

mgifford’s picture

@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.

sun’s picture

Status: Reviewed & tested by the community » Needs work
+++ modules/forum/forum.module	11 Aug 2010 21:10:04 -0000
@@ -867,7 +867,7 @@ function forum_get_topics($tid, $sortby,
-    NULL,
+    array('data' => t('Status'), 'field' => null, 'class' => 'element-invisible'),

1) 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.

sun’s picture

um, to clarify, if that actually works in all browsers: awesome!

mgifford’s picture

FileSize
17.2 KB
21.54 KB
15.35 KB
16.35 KB

On 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.

mgifford’s picture

Status: Needs work » Needs review
Issue tags: -Accessibility

#10: forum_missing_th-3.patch queued for re-testing.

mgifford’s picture

Issue tags: +Accessibility

#10: forum_missing_th-3.patch queued for re-testing.

Everett Zufelt’s picture

Version: 7.x-dev » 8.x-dev

Bumping 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.

Everett Zufelt’s picture

Priority: Normal » Minor
Status: Needs review » Needs work

Still needs x-browser testing on this.

IMO this isn't a very critical issue, the alt on the image provides context.

mgifford’s picture

Status: Needs work » Needs review
FileSize
642 bytes

Updating patch from #10.

Bojhan’s picture

I can test windows, what I am a I looking for - just XP and Windows 7, screens of the UI?

mgifford’s picture

FileSize
90.03 KB

We'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.

mgifford’s picture

#31: forum_missing_th-4.patch queued for re-testing.

aparkening’s picture

Title: Accessibility problem with table header » Replace Forum Icon Column with Topic Span

We 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 CSS background-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).

andypost’s picture

Status: Needs review » Needs work

idea is good, theming of forum should be changed

mgifford’s picture

Issue tags: +Novice

Ok, in which case, we need a patch for this issue. Should be a simple one to draw up.

droplet’s picture

It 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" ?

mgifford’s picture

I 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.

Everett Zufelt’s picture

I'm not an SEO specialist, but does Google really care about the forum listing page, or the unique content pages (articles / posts)?

droplet’s picture

Priority: Normal » Minor
FileSize
2.67 KB

@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.

droplet’s picture

Priority: Minor » Normal
Status: Needs work » Needs review
droplet’s picture

Priority: Minor » Normal
FileSize
3.06 KB
2.96 KB

fix 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.

andypost’s picture

Status: Needs review » Needs work

Forum should change it's theme|preprocess and css more than this, see #1217002: Clean up the CSS for Forum module

+++ b/core/modules/forum/forum.cssundefined
@@ -15,8 +15,10 @@
-#forum td.forum .icon {
+#forum td .topic {

This should be changed to more short .forum .topic

+++ b/core/modules/forum/forum.cssundefined
@@ -15,8 +15,10 @@
+#forum td .icon{

I think core should not use direct tags.

+++ b/core/modules/forum/forum.cssundefined
@@ -31,24 +33,19 @@
-#forum .icon .topic-status-hot {
+#forum .icon.topic-status-hot {

is there a reason for .icon prefix at all?

droplet’s picture

Status: Needs work » Needs review
FileSize
3.05 KB

#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.

andypost’s picture

Makes a lot of sense, let's get review from one of accessibility guys! +1 to commit

droplet’s picture

FileSize
3.15 KB

My bad. I added same class to td & div. minimum the changes.

mgifford’s picture

#47: forum-listing-47.patch queued for re-testing.

eloivaque’s picture

FileSize
3.23 KB

We think that there are an error with the path files in the patch #47.
We tried to change it

mgifford’s picture

Can 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

eloivaque’s picture

Sorry @mgifford, it's not a error.

I simply change the paths of the files containing the patch.

mgifford’s picture

FileSize
97.47 KB
105.05 KB

Here's a screenshot from an Ubuntu Firefox install as a logged in & anonymous user. Looks good to me!

barraponto’s picture

It looks like a case for IMG + ALT. But if there's a legitimate reason not to, we could just add sprites here.

mgifford’s picture

I'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.

mgifford’s picture

Status: Needs review » Reviewed & tested by the community

This 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.

webchick’s picture

Status: Reviewed & tested by the community » Needs review
Issue tags: +Needs screenshots

Can we get a quick screenshot of the before/after visual changes with this patch?

mducharme’s picture

Attached pre and post screenshots for the latest chrome, firefox and safari on osx for forum-listing-49.patch

mducharme’s picture

Status: Needs review » Reviewed & tested by the community

updating status

mducharme’s picture

Issue tags: -Needs screenshots
xjm’s picture

Status: Reviewed & tested by the community » Needs review

Thanks @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.

mducharme’s picture

Status: Needs review » Reviewed & tested by the community

Every screenshot shows the markup below the visual. Reverting status.

mgifford’s picture

@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 ?>">

      <td class="topic">
        <?php print $topic->icon; ?>
        <div class="title">
          <div>
            <?php print $topic->title; ?>
          </div>
          <div>
            <?php print $topic->created; ?>
          </div>

with the patch applied?

webchick’s picture

Status: Reviewed & tested by the community » Needs review

Looks like this still needs discussion.

mgifford’s picture

Status: Needs review » Reviewed & tested by the community

My bad. The HTML output is in the screen capture. I didn't read @mducharme's closely enough.

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Great, thanks!

Committed and pushed to 8.x!

bjlewis2’s picture

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

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

chrischinchilla’s picture

Issue summary: View changes

Updated Issue Summary as per - http://core.drupalofficehours.org/task/1216