Problem/Motivation

When the Responsive Tables Filter module is enabled and its setting "Automatically add to all table-based Drupal Views and tables generated via theme rendering" is checked, resetting dismissals on /admin/reports/editoria11y/dismissals doesn't work.

The "Deleted" message appears at the top of the page, and the table cells get the hidden="true" attribute, but the table cells are not hidden and the dismissals remain.

Steps to reproduce

Enable responsive_tables_filter and check "Automatically add to all table-based Drupal Views and tables generated via theme rendering" on /admin/config/content/responsive_tables_filter.

Mark some items flagged by Editoria11y as OK or hidden, then go to /admin/reports/editoria11y/dismissals and try to remove any of them. There are no error messages in the browser console; just a silent fail (but with a success message).

Proposed resolution

I assume the JS in one or the other module would need to be tweaked in order to play nicely together. Maybe it's not something that either module team is interested in fixing, but I thought the conflict was worth noting in case anyone else trying to use both modules is as flummoxed as I was about why dismissals wouldn't clear.

Responsive Tables Filter doesn't offer a way to exempt particular tables from its process, and its library doesn't appear in page attachments (at least not with JS aggregated). As a quick workaround, I added this to a jQuery I'm already running on my admin theme:

// Remove tablesaw stuff (responsive_tables_filter) on Editoria11y dismissals page.
if (window.location.pathname == '/admin/reports/editoria11y/dismissals') {
  $('table.tablesaw').each(function() {
    this.classList.remove('tablesaw-stack');
  });
  $('strong.tablesaw-cell-label').each(function() {
    this.remove();
  });
}

Thanks for Editoria11y! It is awesome.

Comments

kasey_mk created an issue. See original summary.

itmaybejj’s picture

Assigned: Unassigned » itmaybejj

Thanks for posting the workaround; I'll take a look at this in the next release cycle.

mark_fullmer’s picture

Maintainer of Responsive Tables Filter here, chiming in. I think the problem stems from the fact that the reponsive tables logic wraps the "Reset" link in a span tag, as shown below, and the JavaScript in Editoria11y assumes that the <a> is the immediate sibling of the <td> element here: https://git.drupalcode.org/project/editoria11y/-/blob/2.2.x/js/editoria1...

<span class="tablesaw-cell-content">
  <a role="button" title="Reset this dismissal" class="ed11y-reset-this-dismissal action-link action-link--icon-trash">
    <span hidden="" class="ed11y-api-by">1</span>
    <span hidden="" class="ed11y-api-path">/node/1</span>
   </a>
</span>

Ideally, the targeting JS in Editoria11y can be more tractable and the two modules can play nice together.

  • itmaybejj committed 15ab5581 on 2.2.x
    Issue #3536720 by itmaybejj: Conflict with Responsive Tables Filter...

  • itmaybejj committed 161b3d80 on 2.2.x
    Issue #3536720 by itmaybejj: Conflict with Responsive Tables Filter...
itmaybejj’s picture

Version: 3.0.x-dev » 2.2.x-dev
Status: Active » Fixed

That was indeed the issue.

This whole page should be rewritten; the code is far too fragile as it is. I may revisit in the 3.x branch. But in the interim -- I tagged a release with a quick fix.

Status: Fixed » Closed (fixed)

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