I just stumbled into this when trying to set up the forums in the CVS version of Drupal 7 & editing it admin/structure/forum

I could see an alphabetize list, but not the drag/drop.

I think this is because of the use of depth rather than weight, but I'm not sure. I didn't realize that drag/drop was being used in the forums as well.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mgifford’s picture

mgifford’s picture

Issue tags: +Accessibility
bowersox’s picture

What is the root cause of the problem here? Does anyone know how Forum is using weight (or can you explain how "depth" is used instead)?

Also, is it broken for all users or only for users doing "Re-order rows by numerical weight instead of dragging"?

mgifford’s picture

It's just broken if you've clicked on the Show/Hide weight link we brought into the Drag/Drop. It's enabled & working fine if you either click on it to zip back to normal or just haven't clicked that link before.

I'm not sure why it is inconsistent.

Everett Zufelt’s picture

I don't seem to understand the problem.

What is this UI supposed to do?
What is it doing currently?

mgifford’s picture

In the screen capture in #1 that I didn't describe, sorry, I didn't see any weight tables available when the drag/drop interface was disabled. All I saw was a title row & the edit row.

Are you able to to reorder the forums? Maybe there's another issue that was interfering with my ability to see the weight.

Everett Zufelt’s picture

What happens when you load this page with JS disabled?

mgifford’s picture

FileSize
57.45 KB

Pretty much the same thing. I get inputs for edit-tid70-tid & edit-tid70-depth but not for weight. Code is here:

    <form action="/admin/structure/forum"  method="post" id="forum-overview" accept-charset="UTF-8">
<div><table id="taxonomy" class="sticky-enabled">
 <thead><tr><th>Name</th><th>Operations</th> </tr></thead>
<tbody>
 <tr class="draggable odd"><td><a href="/forum/3">demo data</a><input type="hidden" name="tid:3:0[parent]" id="edit-tid30-parent" value="0"  class="term-parent" />
<input type="hidden" name="tid:3:0[tid]" id="edit-tid30-tid" value="3"  class="term-id" />
<input type="hidden" name="tid:3:0[depth]" id="edit-tid30-depth" value="0"  class="term-depth" />
</td><td><a href="/admin/structure/forum/edit/forum/3?destination=admin/structure/forum">edit forum</a></td> </tr>

 <tr class="draggable even"><td><div class="indentation">&nbsp;</div><a href="/forum/7">kecac</a><input type="hidden" name="tid:7:0[parent]" id="edit-tid70-parent" value="3"  class="term-parent" />
<input type="hidden" name="tid:7:0[tid]" id="edit-tid70-tid" value="7"  class="term-id" />
<input type="hidden" name="tid:7:0[depth]" id="edit-tid70-depth" value="1"  class="term-depth" />
</td><td><a href="/admin/structure/forum/edit/forum/7?destination=admin/structure/forum">edit forum</a></td> </tr>
 <tr class="draggable odd"><td><div class="indentation">&nbsp;</div><a href="/forum/5">shawebe</a><input type="hidden" name="tid:5:0[parent]" id="edit-tid50-parent" value="3"  class="term-parent" />
<input type="hidden" name="tid:5:0[tid]" id="edit-tid50-tid" value="5"  class="term-id" />
<input type="hidden" name="tid:5:0[depth]" id="edit-tid50-depth" value="1"  class="term-depth" />
</td><td><a href="/admin/structure/forum/edit/forum/5?destination=admin/structure/forum">edit forum</a></td> </tr>

Sceenshot of the top of the table (without Javascript enabled) is attached.

Everett Zufelt’s picture

Priority: Normal » Critical

Setting to critical as this table cannot be reordered using the weight column. It is 'possible' that this could be resolved if the correct inputs are set to text and not hidden.

Everett Zufelt’s picture

Title: Forum uses inconsistent weight tables » Admin table for Forums cannot be reordered by weight
AaronBauman’s picture

Status: Active » Closed (duplicate)

Forum uses the default taxonomy form, which displays the same symptoms described here.
This issue is a duplicate of #448292: Drag and Drop for table rows is not accessible to screen-reader users

AaronBauman’s picture

Title: Admin table for Forums cannot be reordered by weight » Terms cannot be manually reordered by weight.
Component: forum.module » taxonomy.module
Status: Closed (duplicate) » Active

After slogging through the comments, looks like this ticket was spawned from 448292, so should probably stand on its own.
Renaming to reflect greater scope of the issue.

There's also a disconnect between the label "Show row weights" and the fact that a vocabulary hierarchy is defined by depth (parent tid) in addition to weight.

mgifford’s picture

In that very long Drag/Drop thread we did deal with the depth issue by stating that it needs to be managed by editing the item. There was no way of gracefully displaying the options of parents. However the weight column was something that could be managed in a table format like this.

The weight column just doesn't appear to be displayed within the taxonomy module.

AaronBauman’s picture

Status: Active » Needs review
FileSize
197.23 KB
4.79 KB

Here's a first stab at this issue:

  • Creates "Weight" column as a select list (drupal type "weight").
  • Exposes "Parent" column as a select list with labels like "Term Name (tid)".
    It might be unwieldy for 100+ term vocabs, or vocabularies with non-unique term names, but it's better than having to edit each term one at a time.
  • As mgifford alluded to, previously terms were weighted solely based on their order in the POST array. Updated submit handler to weight terms based on value of weight field.

There are certainly improvements to be made, but this at least makes the taxonomy term overview form accessible.
Screenshot demonstrates this patch with a devel-generated taxonomy after enabling "Show row weights".

Status: Needs review » Needs work

The last submitted patch, 846524-taxonomy-term-overview-ax.patch, failed testing.

mgifford’s picture

Status: Needs work » Active
FileSize
3.46 KB

We'd discussed adding the depth in the broader drag/drop discussion & at that time decided not to include a parent drop/down for other forms.

I've removed this from your patch & uploaded another version. Perhaps it will get by the bots this time.

Thanks for doing this.

mgifford’s picture

Status: Active » Needs review

go bot go

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

The last submitted patch, 846524-taxonomy-term-overview-ax-2.patch, failed testing.

AaronBauman’s picture

Status: Needs work » Needs review

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

The last submitted patch, 846524-taxonomy-term-overview-ax-2.patch, failed testing.

AaronBauman’s picture

Status: Needs work » Needs review
FileSize
5.65 KB

updated tests

mgifford’s picture

Thanks! This looks good to me.... Now who should look at it to see that it's RTBC?

grey_beard’s picture

Status: Needs review » Reviewed & tested by the community

Applied patch & tested; it works!

marcingy’s picture

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Awesome, thanks.

Before this patch, although the "show row weights" link appears, it doesn't actually do anything. This patch puts back in the behaviour so it matches with similar drag-and-drop screens (menu, etc.)

Committed to HEAD.

It would be really great if someone could document the "best practice" around how to create an accessible tabledrag table in source code form as part of the Examples for Developers project. In Drupal 8, we should look at building such accessibility into the element automatically.

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

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