Title: How to Remove Rules (filter parameter documentation)?
Last modified: May 19, 2021

---

# How to Remove Rules (filter parameter documentation)?

 *  Resolved [Bjarne Oldrup](https://wordpress.org/support/users/oldrup/)
 * (@oldrup)
 * [5 years ago](https://wordpress.org/support/topic/how-to-remove-rules-filter-parameter-documentation/)
 * Hi 🙂
 * I am attempting to filter out a few rules, where Accessibility Checker triggers
   a violation due to how my theme is coded, of course after double-checking that
   the WCAG requirements are actually met, and keeping an eye on those areas using
   other tools.
 * Looking at the documentation at [https://equalizedigital.com/accessibility-checker/how-to-remove-rules/](https://equalizedigital.com/accessibility-checker/how-to-remove-rules/)
   the filter looks like this:
 *     ```
       add_filter('ac_filter_rules','my_rule_filter');
       function my_rule_filter($rules){
       $rules = ac_remove_element_with_value($rules, 'slug', 'slider_present');
       return $rules;
       }
       ```
   
 * a) Is there a place, where I can look up the parameters for the different rules?
   In the example, I guess the filter targets the “Slider Present” rule. I’m specifically
   looking into filtering out the “Insufficient Color Contrast”, the “Empty or Missing
   Form Label” and possible the “Broken Skip or Anchor Link” rules.
 * b) Also, I guess the ‘slug’ parameter, targets a specific URL. Is there a way,
   to target all posts and/or pages or a post type?
 * Hope you can help.
 * Kind regards
    Bjarne
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fhow-to-remove-rules-filter-parameter-documentation%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 9 replies - 1 through 9 (of 9 total)

 *  Plugin Author [Steve Jones](https://wordpress.org/support/users/stevejonesdev/)
 * (@stevejonesdev)
 * [5 years ago](https://wordpress.org/support/topic/how-to-remove-rules-filter-parameter-documentation/#post-14458844)
 * Hi [@oldrup](https://wordpress.org/support/users/oldrup/),
 * I’ve update the documentation to include the rule parameters such as the slugs
   you’ll need to filter out specific rules. I also update the documentation to 
   have the updated function prefixes so you’ll want to use the updated example 
   code rather then what you have pasted above. The slug in the case don’t pertain
   to a specific URL and will filter rules globally. Below is an example on how 
   to filter out the rules you listed.
 *     ```
       add_filter('edac_filter_rules','my_rule_filter');
       function my_rule_filter($rules){
       	$rules = edac_remove_element_with_value($rules, 'slug', 'color_contrast_failure');
       	$rules = edac_remove_element_with_value($rules, 'slug', 'empty_form_label');
       	$rules = edac_remove_element_with_value($rules, 'slug', 'broken_skip_anchor_link');
       	return $rules;
       }
       ```
   
 * Thanks,
 * Steve
 *  Thread Starter [Bjarne Oldrup](https://wordpress.org/support/users/oldrup/)
 * (@oldrup)
 * [5 years ago](https://wordpress.org/support/topic/how-to-remove-rules-filter-parameter-documentation/#post-14459087)
 * Hey Steve
 * Thanks for the additions to the documentation, much appreciated.
 * I still struggle to get the filters to work though. I’m using the Code Snippets
   plugin, as always, for my few custom filters. Screenshot: [https://snipboard.io/jNGktg.jpg](https://snipboard.io/jNGktg.jpg)
 * Tried disabling anything I could imagine conflicting, and re-installed the plugin
   several times. No success: [https://snipboard.io/UXhWw5.jpg](https://snipboard.io/UXhWw5.jpg)
 * The “how to remove all warning rules” sample, seems to kick in, but removes all
   issues, not only warnings.
 * I will eventually test this on a fresh WP install. Let me know if you’d like 
   a temporary login to poke around.
 * Kind regards
    Bjarne
 *  Plugin Author [Steve Jones](https://wordpress.org/support/users/stevejonesdev/)
 * (@stevejonesdev)
 * [5 years ago](https://wordpress.org/support/topic/how-to-remove-rules-filter-parameter-documentation/#post-14459108)
 * Do you see any of the excluded rules in the details tab?
 *  Thread Starter [Bjarne Oldrup](https://wordpress.org/support/users/oldrup/)
 * (@oldrup)
 * [5 years ago](https://wordpress.org/support/topic/how-to-remove-rules-filter-parameter-documentation/#post-14459141)
 * Yes I do. Here tested in Chrome, normally using Firefox.
 * [https://snipboard.io/C9c1ns.jpg](https://snipboard.io/C9c1ns.jpg)
 *  Plugin Author [Steve Jones](https://wordpress.org/support/users/stevejonesdev/)
 * (@stevejonesdev)
 * [5 years ago](https://wordpress.org/support/topic/how-to-remove-rules-filter-parameter-documentation/#post-14459189)
 * Sorry it looks like I had the wrong filter set. Try this.
 *     ```
       add_filter('edac_filter_register_rules','my_rule_filter');
       function my_rule_filter($rules){
       	$rules = edac_remove_element_with_value($rules, 'slug', 'color_contrast_failure');
       	$rules = edac_remove_element_with_value($rules, 'slug', 'empty_form_label');
       	$rules = edac_remove_element_with_value($rules, 'slug', 'broken_skip_anchor_link');
       	return $rules;
       }
       ```
   
 * After adding this filter the post will need to be saved again to update the error
   count of the summary tab.
 *  Thread Starter [Bjarne Oldrup](https://wordpress.org/support/users/oldrup/)
 * (@oldrup)
 * [5 years ago](https://wordpress.org/support/topic/how-to-remove-rules-filter-parameter-documentation/#post-14459765)
 * Uh. Now we are getting somewhere…
 * Have a look at this screenshot: [https://snipboard.io/VFEf5e.jpg](https://snipboard.io/VFEf5e.jpg)
 * The “Text to small” warning is triggered on purpose – I wanted to make sure I
   still warnings if any exists.
 * The “contrast errors” and “empty anchor link” filters kicks in just fine. No 
   longer triggers errors.
 * But the “Missing Form Label” error is still thrown. The parameter in the filter
   says empty_form_label (empty, not missing). A typo maybe? Two different checks?
 * Thank you so much for your help 🙂
    Bjarne
 *  Plugin Author [Steve Jones](https://wordpress.org/support/users/stevejonesdev/)
 * (@stevejonesdev)
 * [5 years ago](https://wordpress.org/support/topic/how-to-remove-rules-filter-parameter-documentation/#post-14459771)
 * They are two different checks. This is the slug for Missing Form Label: missing_form_label
 *  Thread Starter [Bjarne Oldrup](https://wordpress.org/support/users/oldrup/)
 * (@oldrup)
 * [5 years ago](https://wordpress.org/support/topic/how-to-remove-rules-filter-parameter-documentation/#post-14459792)
 * But of course 😮 It’s getting late in Denmark.
 * Thank you so much. Now I might “only” perform 37 checks instead of 40, but on
   the other side, I’m only getting warned about actual errors and there will pay
   attention 🙂
 * Actually having an empty table header and missing a subheader on [https://snipboard.io/zA0nGT.jpg](https://snipboard.io/zA0nGT.jpg)
 * Nice job. Thanks again.
 *  Plugin Author [Steve Jones](https://wordpress.org/support/users/stevejonesdev/)
 * (@stevejonesdev)
 * [5 years ago](https://wordpress.org/support/topic/how-to-remove-rules-filter-parameter-documentation/#post-14459799)
 * No problem [@oldrup](https://wordpress.org/support/users/oldrup/). Happy to help
   out and great job focusing on make your site more Accessible. 👍

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘How to Remove Rules (filter parameter documentation)?’ is closed to new
replies.

 * ![](https://ps.w.org/accessibility-checker/assets/icon-256x256.png?rev=3094626)
 * [Equalize Digital Accessibility Checker - WCAG, ADA, EAA and Section 508 compliance](https://wordpress.org/plugins/accessibility-checker/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/accessibility-checker/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/accessibility-checker/)
 * [Active Topics](https://wordpress.org/support/plugin/accessibility-checker/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/accessibility-checker/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/accessibility-checker/reviews/)

 * 9 replies
 * 2 participants
 * Last reply from: [Steve Jones](https://wordpress.org/support/users/stevejonesdev/)
 * Last activity: [5 years ago](https://wordpress.org/support/topic/how-to-remove-rules-filter-parameter-documentation/#post-14459799)
 * Status: resolved