Skip to content

Instantly share code, notes, and snippets.

View amberhinds's full-sized avatar

Amber Hinds amberhinds

View GitHub Profile
@amberhinds
amberhinds / style.css
Created January 15, 2024 20:55
CSS Fixes to make WooCommerce more accessible
/** Fix focus indicators **/
.editor-styles-wrapper .wc-block-grid__products .wc-block-grid__product .wc-block-components-product-image a:focus,
.wc-block-components-product-image a:focus,
.wp-element-button:focus,
.wp-block-button__link:focus {
outline-style: solid;
outline-width: 2px;
outline-offset: 2px;
}
@amberhinds
amberhinds / functions.php
Created August 14, 2023 19:07
Add row and col scope to table headers in TablePress
/**
* Add scope attributes to table headers
*
* @param mixed $output HTML output of the table.
* @param mixed $table Table object.
* @param array $render_options Render options.
* @return string HTML output of the table.
*/
function tablepress_add_scope( $output, $table, $render_options ) {
$dom = new DOMDocument();
@amberhinds
amberhinds / table.html
Last active March 21, 2023 04:15
HTML Table with row and column scoped headers
<table>
<thead>
<tr>
<th scope="col">Video Creation & Editing Features</th>
<th scope="col">Free</th>
<th scope="col">Pro</th>
<th scope="col">Team</th>
<th scope="col">Enterprise</th>
</tr>
</thead>
@amberhinds
amberhinds / Footer.php
Created February 14, 2023 04:14
Strip role="button" from Elementor links
@amberhinds
amberhinds / likert-bad.html
Last active November 11, 2021 23:12
This shows the current (incorrect) HTML in the likert field
<div id="field_2_3" class="gfield gfield_contains_required field_sublabel_below field_description_above gfield_visibility_visible gsurvey-survey-field " data-field-class="gsurvey-survey-field">
<label class="gfield_label">Were you satisfied with the overall TA or support you received?
<span class="gfield_required">
<span class="gfield_required gfield_required_asterisk"> * <span class="sr-only"> Required</span>
</span></span>
</label>
<div class="ginput_container ginput_container_likert">
<table class="gsurvey-likert" id="input_2_3">
<thead>
<tr>
@amberhinds
amberhinds / rwc-base.js
Created August 3, 2020 18:04
Base JS file from the Workforce Solutions Portal; includes GP Nested Forms Accessibility Fixes
/**
* RWC Base entry point.
*
* @package RWC Base JS
* @author Road Warrior Creative
* @license GPL-2.0-or-later
*/
var rwcBase = ( function( $ ) {
'use strict';
@amberhinds
amberhinds / function.php
Created July 6, 2020 14:28
hide category from UAG post grid
// Remove Featured Provider posts on blog grid on home page
add_filter( 'uagb_post_query_args_grid', function( $args ){
global $post;
if ( isset( $post ) && isset( $post->ID ) && 1757 === $post->ID ) {
$args['category__not_in'] = array( 2276 );
}
return $args;
} );
/**
* This script adds the accessibility-ready responsive menus Genesis Framework child themes.
*
* @author StudioPress
* @link https://github.com/copyblogger/responsive-menus
* @version 1.1.3
* @license GPL-3.0-or-later
*/
( function ( document, $, undefined ) {
@amberhinds
amberhinds / Style.css
Created May 10, 2019 14:36
Genesis Mega Menu
@media only screen and (min-width: 1024px) {
.genesis-responsive-menu .wrap {
position: relative;
}
/* the mega menu */
.mega-menu > .sub-menu {
background-color: #fff;
-webkit-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
@amberhinds
amberhinds / food-blogger-categories.php
Created March 29, 2019 15:13
Adds food/recipe related taxonomies to blog posts
// Create meal type taxonomy
add_action( 'init', 'rwc_mealtype_tax' );
function rwc_mealtype_tax() {
$labels = array(
'name' => _x( 'Meal Types', 'taxonomy general name' ),
'singular_name' => _x( 'Meal Type', 'taxonomy singular name' ),
'search_items' => __( 'Search Meal Types' ),
'all_items' => __( 'All Meal Types' ),
'parent_item' => __( 'Parent Meal Type' ),
'parent_item_colon' => __( 'Parent Meal Type:' ),