Title: TablePress Accessibility
Last modified: February 6, 2019

---

# TablePress Accessibility

 *  Resolved [lukewarm2019](https://wordpress.org/support/users/lukewarm2019/)
 * (@lukewarm2019)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/tablepress-accessibility/)
 * I’ve followed instructions in “TablePress ADA accessibility” post. All pages 
   with tables crashed.
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Ftablepress-accessibility%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 15 replies - 1 through 15 (of 17 total)

1 [2](https://wordpress.org/support/topic/tablepress-accessibility/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/tablepress-accessibility/page/2/?output_format=md)

 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/tablepress-accessibility/#post-11177004)
 * Hi,
 * thanks for your post, and sorry for the trouble.
 * Are you referring to [https://wordpress.org/support/topic/tablepress-ada-accessibility/](https://wordpress.org/support/topic/tablepress-ada-accessibility/)?
   
   If so, what exactly did you modify where? And what does “crashed” mean here?
 * Regards,
    Tobias
 *  Thread Starter [lukewarm2019](https://wordpress.org/support/users/lukewarm2019/)
 * (@lukewarm2019)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/tablepress-accessibility/#post-11177020)
 * Yes, that was the post.
 * I copied:
 *     ```
       function ada_tablepress_add_summary( $table_attributes, $table, $render_options ) {
       	$table_attributes['summary'] = $table['description'];
       	return $table_attributes;
       }
       add_filter( 'tablepress_table_tag_attributes', 'ada_tablepress_add_summary', 10, 3 );
       ```
   
 * and
 *     ```
       function ada_tablepress_add_scope(  $tag_attributes, $table_id, $cell_content, $row_number, $col_number, $colspan, $rowspan ) {
           if ( $row_idx === 1 ) {
               $tag_attributes['scope'] = "col";
               return $tag_attributes;
           }
       }
       add_filter( 'tablepress_cell_tag_attributes', 'ada_tablepress_add_scope', 10, 7 );
       ```
   
 * Pages like [https://clevelandcc.edu/for-students/student-resources/talent-search/](https://clevelandcc.edu/for-students/student-resources/talent-search/)
   never loaded.
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/tablepress-accessibility/#post-11177033)
 * Hi,
 * ok, and where did you put this?
 * Please try again with the `WP_DEBUG` constant set to `true` in your site’s wp-
   config.php file, see [https://codex.wordpress.org/Editing_wp-config.php#Debug](https://codex.wordpress.org/Editing_wp-config.php#Debug)
   
   This should then reveal more error information instead of the blank page.
 * Regards,
    Tobias
 *  Thread Starter [lukewarm2019](https://wordpress.org/support/users/lukewarm2019/)
 * (@lukewarm2019)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/tablepress-accessibility/#post-11177044)
 * Sorry. I placed the code in the “functions.php” file of my theme.
 *  Thread Starter [lukewarm2019](https://wordpress.org/support/users/lukewarm2019/)
 * (@lukewarm2019)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/tablepress-accessibility/#post-11177054)
 * There is no ‘define( ‘WP_DEBUG’, false );’.
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/tablepress-accessibility/#post-11177090)
 * Hi,
 * putting it in the “functions.php” of your theme is correct, just be sure that
   it’s before a closing `?>` at the end of the file (if that’s there).
 * If there is no such line in the wp-config.php, just add
 *     ```
       define( 'WP_DEBUG', true );
       ```
   
 * somewhere after the line that says to stop editing there.
 * Regards,
    Tobias
 *  Thread Starter [lukewarm2019](https://wordpress.org/support/users/lukewarm2019/)
 * (@lukewarm2019)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/tablepress-accessibility/#post-11177128)
 * OK. Will attempt tomorrow.
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/tablepress-accessibility/#post-11177143)
 * Hi,
 * sounds good! Please let me know if that reveals an error that you can not fix
   directly.
 * Regards,
    Tobias
 *  Thread Starter [lukewarm2019](https://wordpress.org/support/users/lukewarm2019/)
 * (@lukewarm2019)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/tablepress-accessibility/#post-11179661)
 * I added the code again with the ‘define( 'WP_DEBUG', true );’ statement included.
   
   All pages that contain TablePress short code don’t even process. No error messages.
   Get blank, white pages. Don’t even have source code of any kind.
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/tablepress-accessibility/#post-11179729)
 * Hi,
 * that’s really strange then…
 * Are you sure that you are copying the exact code from above. What’s really important
   are that the single and double quotation marks are important.
    Can you maybe 
   post a link to a screenshot of where you added the PHP code?
 * Regards,
    Tobias
 *  Thread Starter [lukewarm2019](https://wordpress.org/support/users/lukewarm2019/)
 * (@lukewarm2019)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/tablepress-accessibility/#post-11179776)
 * Here a screenshot: [http://152.27.13.243/functions.php_code.png](http://152.27.13.243/functions.php_code.png)
 * NOTE: your original code was missing an apostrophe.
 *     ```
       function ada_tablepress_add_summary( $table_attributes, $table, $render_options ) {
       	$table_attributes[ summary'] = $table['description'];
       	return $table_attributes;
       }
       add_filter( 'tablepress_table_tag_attributes', 'ada_tablepress_add_summary', 10, 3 );
       ```
   
 * `$table_attributes[ summary'] = $table['description'];`
 * I’ve added it in the corrected code.
    -  This reply was modified 7 years, 4 months ago by [lukewarm2019](https://wordpress.org/support/users/lukewarm2019/).
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/tablepress-accessibility/#post-11179959)
 * Hi,
 * ah, yes, nice catch! The TablePress code now looks fine to me, and it seems to
   be in the right place and file.
 * However, that
 *     ```
       define( 'WP_DEBUG', true );
       ```
   
 * line is in the wrong file! This must go into your site’s wp-config.php file, 
   above the line that says to stop editing there!
 * Regards,
    Tobias
 *  Thread Starter [lukewarm2019](https://wordpress.org/support/users/lukewarm2019/)
 * (@lukewarm2019)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/tablepress-accessibility/#post-11180049)
 * The “debug” code is already in the wp-config.php file.
    Still getting blank pages.
 *  Thread Starter [lukewarm2019](https://wordpress.org/support/users/lukewarm2019/)
 * (@lukewarm2019)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/tablepress-accessibility/#post-11180060)
 * Here’s an error I’m getting from my hosting server log:
 * `Uncaught TypeError: Argument 1 passed to TablePress_Render::_attributes_array_to_string()
   must be of the type array, null given, called in /srv/bindings/246c701ad8d54926b82c6cf2e13cc6af/
   code/wp-content/plugins/tablepress/classes/class-render.php on line 672 and defined
   in /srv/bindings/246c701ad8d54926b82c6cf2e13cc6af/code/wp-content/plugins/tablepress/
   classes/class-render.php:733 Stack trace: #0 /srv/bindings/246c701ad8d54926b82c6cf2e13cc6af/
   code/wp-content/plugins/tablepress/classes/class-render.php(672): TablePress_Render-
   >_attributes_array_to_string(NULL) #1 /srv/bindings/246c701ad8d54926b82c6cf2e13cc6af/
   code/wp-content/plugins/tablepress/classes/class-render.php(371): TablePress_Render-
   >_render_row(0, 'td') #2 /srv/bindings/246c701ad8d54926b82c6cf2e13cc6af/code/
   wp-content/plugins/tablepress/classes/class-render.php(135): TablePress_Render-
   >_render_table() #3 /srv/bindings/246c701ad8d54926b82c6cf2e13cc6af/code/wp-content/
   plugins/tablepress/controllers/controller-frontend.php(645):`
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/tablepress-accessibility/#post-11180204)
 * Hi,
 * ah! That helps! 🙂
 * Now I see what’s going on. A pretty dumb mistake in my code. The `ada_tablepress_add_scope`
   function is not returning anything for rows other than 1. So, please change that
   function to
 *     ```
       function ada_tablepress_add_scope(  $tag_attributes, $table_id, $cell_content, $row_number, $col_number, $colspan, $rowspan ) {
           if ( $row_idx === 1 ) {
               $tag_attributes['scope'] = "col";
           }
           return $tag_attributes;
       }
       add_filter( 'tablepress_cell_tag_attributes', 'ada_tablepress_add_scope', 10, 7 );
       ```
   
 * Regards,
    Tobias

Viewing 15 replies - 1 through 15 (of 17 total)

1 [2](https://wordpress.org/support/topic/tablepress-accessibility/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/tablepress-accessibility/page/2/?output_format=md)

The topic ‘TablePress Accessibility’ is closed to new replies.

 * ![](https://ps.w.org/tablepress/assets/icon.svg?rev=3192944)
 * [TablePress - Tables in WordPress made easy](https://wordpress.org/plugins/tablepress/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/tablepress/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/tablepress/)
 * [Active Topics](https://wordpress.org/support/plugin/tablepress/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/tablepress/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/tablepress/reviews/)

 * 17 replies
 * 2 participants
 * Last reply from: [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * Last activity: [7 years, 4 months ago](https://wordpress.org/support/topic/tablepress-accessibility/page/2/#post-11180304)
 * Status: resolved