Accessibility
This document describes various design choices to improve accessibility of an Elgg site.
Forms
Input fields should always have an associated label. When using elgg_view_field($options) to draw fields on a form you will need to
pass $options['#label'] = elgg_echo('my_field:label') to have a correct label with your field.
If you have a form that will perform a search when submitted it is recommended to add 'role' => 'search' to your form attributes.
You can provide this in $form_vars when using elgg_view_form().
Images
When using elgg_view('output/img', $options) it is recommended to provide an alt description of the image.
Elgg will report notices in the error log to let developers know when an alt attribute is missing.
Headings
Headings should be used to give structure to a page.
There should always be a h1 on the page and there should also be no gaps (so no h3 without a h2).
Elgg uses h1 for the page title (like ‘All blogs’, the title of a blog or the name of a group on the group profile page).
The h2 heading is used by modules on a page, like an ‘info’ module, a widget or a module in the sidebar.
User generated content with markup, for example a description of a blog, should not allow h1 to be used,
but should start with h2 as the first level heading. The configuration of the CKEditor plugin already handles this.
Sections
A webpage in Elgg is typically sectioned into the following sections:
headerfor the topbar contents like the site logo, site navigation and searchmainthe main content like the blog page or an overview of membersfootertypically found at the bottom of the page containing some links or other site related information