From 4bde11528bdfe34e66160a639f45f605581c36d5 Mon Sep 17 00:00:00 2001 From: Rossiani Wijaya Date: Mon, 5 Nov 2012 15:06:33 +0800 Subject: [PATCH] MDL-34572 accessibility compliance for repository: add label for form input text and select tag --- files/renderer.php | 7 ++++++- lang/en/repository.php | 1 + repository/alfresco/lang/en/repository_alfresco.php | 1 + repository/alfresco/lib.php | 4 +++- repository/draftfiles_manager.php | 6 ++++-- repository/filepicker.php | 4 ++-- 6 files changed, 17 insertions(+), 6 deletions(-) diff --git a/files/renderer.php b/files/renderer.php index 98c84311bb394..75ce2ab0ca426 100644 --- a/files/renderer.php +++ b/files/renderer.php @@ -929,7 +929,12 @@ public function filepicker_js_templates() { * Default contents is one text input field with name="s" */ public function repository_default_searchform() { - $str = ''; + $searchinput = html_writer::label(get_string('searchrepo', 'repository'), + 'reposearch', false, array('class' => 'accesshide')); + $searchinput .= html_writer::empty_tag('input', array('type' => 'text', + 'id' => 'reposearch', 'name' => 's', 'value' => get_string('search', 'repository'))); + $str = html_writer::tag('div', $searchinput, array('class' => "fp-def-search")); + return $str; } } diff --git a/lang/en/repository.php b/lang/en/repository.php index 8682378aa37ae..b430e569a6177 100644 --- a/lang/en/repository.php +++ b/lang/en/repository.php @@ -191,6 +191,7 @@ $string['automatedbackup'] = 'Automated backups'; $string['search'] = 'Search'; $string['searching'] = 'Search in'; +$string['searchrepo'] = 'Search repository'; $string['select'] = 'Select'; $string['settings'] = 'Settings'; $string['setupdefaultplugins'] = 'Setting up default repository plugins'; diff --git a/repository/alfresco/lang/en/repository_alfresco.php b/repository/alfresco/lang/en/repository_alfresco.php index 14f51feba1d92..1a63fb1d8cae9 100644 --- a/repository/alfresco/lang/en/repository_alfresco.php +++ b/repository/alfresco/lang/en/repository_alfresco.php @@ -32,4 +32,5 @@ $string['pluginname_help'] = 'A plug-in for Alfresco CMS'; $string['pluginname'] = 'Alfresco repository'; $string['soapmustbeenabled'] = 'SOAP extension must be enabled for alfresco plugin'; +$string['space'] = 'Space'; $string['username'] = 'User name'; diff --git a/repository/alfresco/lib.php b/repository/alfresco/lib.php index b991d2e49d6a3..14f73be41e243 100644 --- a/repository/alfresco/lib.php +++ b/repository/alfresco/lib.php @@ -219,7 +219,9 @@ public function get_link($uuid) { public function print_search() { $str = parent::print_search(); - $str .= '
'; foreach ($this->user_session->stores as $v) { $str .= '