#567192 by mgifford: Fixed Expanding simpletest groups not accessible via keyboard.
parent
66c63ff3e2
commit
32fc5ac835
|
@ -71,3 +71,22 @@ div.simpletest-image {
|
|||
display: inline;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
a.simpletest-collapse {
|
||||
height: 0;
|
||||
width: 0;
|
||||
top: -99em;
|
||||
position: absolute;
|
||||
|
||||
}
|
||||
|
||||
a.simpletest-collapse:focus,
|
||||
a.simpletest-collapse:hover {
|
||||
font-size: 80%;
|
||||
top: 0px;
|
||||
height: auto;
|
||||
width: auto;
|
||||
overflow: visible;
|
||||
position: relative;
|
||||
z-index: 1000;
|
||||
}
|
|
@ -83,8 +83,8 @@ function theme_simpletest_test_table($variables) {
|
|||
// Define the images used to expand/collapse the test groups.
|
||||
$js = array(
|
||||
'images' => array(
|
||||
theme('image', array('path' => 'misc/menu-collapsed.png', 'alt' => 'Expand', 'title' => 'Expand')),
|
||||
theme('image', array('path' => 'misc/menu-expanded.png', 'alt' => 'Collapsed', 'title' => 'Collapsed')),
|
||||
theme('image', array('path' => 'misc/menu-collapsed.png', 'alt' => t('Expand'), 'title' => t('Expand'))) . ' <a href="#" class="simpletest-collapse">(' . t('Expand') . ')</a>',
|
||||
theme('image', array('path' => 'misc/menu-expanded.png', 'alt' => t('Collapse'), 'title' => t('Collapse'))) . ' <a href="#" class="simpletest-collapse">(' . t('Collapse') . ')</a>',
|
||||
),
|
||||
);
|
||||
|
||||
|
|
|
@ -305,6 +305,9 @@ class FormsElementsLabelsTestCase extends DrupalWebTestCase {
|
|||
$elements = $this->xpath('//input[@id="edit-form-textfield-test-title-after"]/following-sibling::label[@for="edit-form-textfield-test-title-after" and @class="option"]');
|
||||
$this->assertTrue(isset($elements[0]), t("Label after field and label option class correct for text field."));
|
||||
|
||||
$elements = $this->xpath('//input[@id="edit-form-textfield-test-title-invisible"]/following-sibling::label[@for="edit-form-textfield-test-title-invisible" and @class="element-invisible"]');
|
||||
$this->assertTrue(isset($elements[0]), t("Label after field and label class is element-invisible."));
|
||||
|
||||
$elements = $this->xpath('//label[@for="edit-form-textfield-test-title-no-show"]');
|
||||
$this->assertFalse(isset($elements[0]), t("No label tag when title set not to display."));
|
||||
}
|
||||
|
|
|
@ -537,6 +537,11 @@ function form_label_test_form(&$form_state) {
|
|||
'#title' => t('Textfield test for title after element'),
|
||||
'#title_display' => 'after',
|
||||
);
|
||||
$form['form_textfield_test_title_invisible'] = array(
|
||||
'#type' => 'textfield',
|
||||
'#title' => t('Textfield test for invisible title'),
|
||||
'#title_display' => 'invisible',
|
||||
);
|
||||
// Textfield test for title set not to display
|
||||
$form['form_textfield_test_title_no_show'] = array(
|
||||
'#type' => 'textfield',
|
||||
|
|
Loading…
Reference in New Issue