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 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);
/**
* 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 / 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;
} );
@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 / 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 / Footer.php
Created February 14, 2023 04:14
Strip role="button" from Elementor links
@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 / 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 / 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
Last active April 9, 2024 15:09
edac_max_alt_length Accessibility Checker filter example
function change_max_alt_length( $max ) {
return 100; // Shorten alt text max character count to 100 from default (300).
}
add_filter( 'edac_max_alt_length', 'change_max_alt_length' );