Skip to main content

California Civil Rights Department, Housing Discrimination

Citation
California Civil Rights Department, Housing Discrimination
Jurisdiction
California (state)
Source
Official source

Related Parts of This Source

Full Text

1,420 chars
/**
* Allow Accordion & Toggle Divi modules to be focusable.
*
* @divi-module Accordion, Toggle
*/
$('.et_pb_toggle').each(function () {
$(this).attr('tabindex', 0);
});

/**
* Prevent spacebar from scolling page when toggle & accordion have focus.
*
* @divi-module Accordion, Toggle
*/
$('.et_pb_toggle').on('keydown', function(e) {
// Spacebar.
if (e.which === 32){
e.preventDefault();
}
});

/**
* Expand Accordion & Toggle modules when enter or spacebar are pressed while focused.
*
* @divi-module Accordion, Toggle
*/
$(document).on('keyup', function(e) {
// Spacebar & Enter.
if (e.which === 13 || e.which === 32) {
$('.et_pb_toggle:focus .et_pb_toggle_title').trigger('click');
}
});

});

jQuery(document).ready(function($) {

/**
* Add unique ID to search module input with matching label.
*
* @divi-module Search
*/
$('.et-search-field').each(function (e) {
$(this).attr('id', 'et_pb_search_module_input_' + e);
$('#et_pb_search_module_input_' + e).before('<label class="da11y-screen-reader-text" for="et_pb_search_module_input_' + e + '">Search for...</label>');
$('#et_pb_search_module_input_' + e).after('<button type="submit" class="da11y-screen-reader-text">Search</button>');
});

/**
* Add unique ID to contact module input with matching label.
*
* @divi-module Contact
*/
$('.et_pb_contact_form').each(function (e) {
$(this).find('.et_pb_contact_captcha_question').parent().wrap('<label></label>');
});