diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php --- a/src/__phutil_library_map__.php +++ b/src/__phutil_library_map__.php @@ -42,6 +42,7 @@ 'AphrontFormPolicyControl' => 'view/form/control/AphrontFormPolicyControl.php', 'AphrontFormRadioButtonControl' => 'view/form/control/AphrontFormRadioButtonControl.php', 'AphrontFormRecaptchaControl' => 'view/form/control/AphrontFormRecaptchaControl.php', + 'AphrontFormSectionControl' => 'view/form/control/AphrontFormSectionControl.php', 'AphrontFormSelectControl' => 'view/form/control/AphrontFormSelectControl.php', 'AphrontFormStaticControl' => 'view/form/control/AphrontFormStaticControl.php', 'AphrontFormSubmitControl' => 'view/form/control/AphrontFormSubmitControl.php', @@ -2670,6 +2671,7 @@ 'AphrontFormPolicyControl' => 'AphrontFormControl', 'AphrontFormRadioButtonControl' => 'AphrontFormControl', 'AphrontFormRecaptchaControl' => 'AphrontFormControl', + 'AphrontFormSectionControl' => 'AphrontFormControl', 'AphrontFormSelectControl' => 'AphrontFormControl', 'AphrontFormStaticControl' => 'AphrontFormControl', 'AphrontFormSubmitControl' => 'AphrontFormControl', diff --git a/src/view/form/control/AphrontFormControl.php b/src/view/form/control/AphrontFormControl.php --- a/src/view/form/control/AphrontFormControl.php +++ b/src/view/form/control/AphrontFormControl.php @@ -169,21 +169,31 @@ $custom_class = $this->getCustomControlClass(); + // If we don't have an ID yet, assign an automatic one so we can associate + // the label with the control. This allows assistive technologies to read + // form labels. + if (!$this->getID()) { + $this->setID(celerity_generate_unique_node_id()); + } + + $input = phutil_tag( + 'div', + array('class' => 'aphront-form-input'), + $this->renderInput()); + if (strlen($this->getLabel())) { $label = phutil_tag( 'label', - array('class' => 'aphront-form-label'), + array( + 'class' => 'aphront-form-label', + 'for' => $this->getID(), + ), $this->getLabel()); } else { $label = null; $custom_class .= ' aphront-form-control-nolabel'; } - $input = phutil_tag( - 'div', - array('class' => 'aphront-form-input'), - $this->renderInput()); - if (strlen($this->getError())) { $error = $this->getError(); if ($error === true) { diff --git a/src/view/form/control/AphrontFormSectionControl.php b/src/view/form/control/AphrontFormSectionControl.php new file mode 100644 --- /dev/null +++ b/src/view/form/control/AphrontFormSectionControl.php @@ -0,0 +1,13 @@ +getValue(); + } + +} diff --git a/src/view/phui/PHUIIconView.php b/src/view/phui/PHUIIconView.php --- a/src/view/phui/PHUIIconView.php +++ b/src/view/phui/PHUIIconView.php @@ -101,6 +101,7 @@ return array( 'href' => $this->href, 'style' => $style, + 'aural' => false, 'class' => $classes, ); } diff --git a/src/view/phui/PHUITimelineEventView.php b/src/view/phui/PHUITimelineEventView.php --- a/src/view/phui/PHUITimelineEventView.php +++ b/src/view/phui/PHUITimelineEventView.php @@ -154,7 +154,14 @@ 'sigil' => 'timeline-extra', 'class' => 'phui-timeline-extra', ), - phutil_implode_html(self::DELIMITER, $extra)); + phutil_implode_html( + javelin_tag( + 'span', + array( + 'aural' => false, + ), + self::DELIMITER), + $extra)); } else { $extra = null; }