Making your Custom Theme more Accessible

We're recently added better 'accessibility' support to Exponent so it may be used with a screen reader. This is mandated with some public website due to the Americans with Disabilities Act. While the code shipped with Exponent v2.4.0 includes these changes, they may need to be integrated into your custom theme. Though you can check your theme/subtheme templates and custom views with the ones we ship, here are some things to look for:

  • The theme/subtheme templates must contain a 'language' in the html tag
    • from
      <html>
      to 
      <html lang="<?php echo (substr(LOCALE,0,2)) ?>">
  • any {img ...} tag found in any template view (.tpl file), must include a 'alt=xxx' entry
  • any button or input area with NO label, or any with only an icon must include 
     aria-label="{'button label'|gettext}"

While this is not an all-encompassing list, it will get you through most of the errors that an accessibility plugin for your browser would report

PHP and Exponent in 2016

PHP LogoThe primary scripting language used in Exponent CMS is PHP, just as with most other CMS packages such as W***P****, J***la, and D***pal. PHP is a scripting processor running on the web server which parses the PHP scripts to perform a task or output a page. Unlike javascript which is processed within the browser on the viewer's device. PHP development has been advancing at break-neck speed over recent months, and here's how it affects Exponent CMS.

Exponent CMS v2.0 was originally released supporting PHP version 5.2.1 or later, which at the time was v5.3.x. Support for PHP v5.4 was added in Exponent v2.0.7. Support for PHP v5.5 was added in Exponent v2.2.1. Support for PHP v5.6 was added in Exponent v2.3.1. Support for PHP version 5.2.x was DROPPED in Exponent v2.3.2 because several of the supporting libraries no longer supported such an old version of PHP. And support for PHP version 7.0, the current stable release was added in Exponent v2.3.7.

Most site administrators have little control over which version of PHP their web host server is running, but some hosts do offer a selection within their 'control panel' settings. Therefore, you have to trust your web host provider in keeping your PHP versions up to date since many of the updates remove security vulnerabilities. PHP version 5.2.x has been obsolete for quite some time. PHP version 5.3.x was termed 'end of life' meaning it was no longer updated in August 2014. PHP version 5.4.x was termed 'end of life' September 2015 and PHP version 5.5 reached 'end of life' a few months ago. With that being said, PHP versions 5.6.x and v7.0.x are the only recommended and supported versions available, both of which will be supported until at least late 2018. PHP version 7.1.x should be released before the end of 2016 and is in beta testing now.

Therefore, if you have a new enough version of Exponent to support a newer version of PHP, you should probably encourage your web host provider to move to it to prevent security attacks from harming your site or data. Furthermore, running PHP v7.0.x will give your site a tremendous speed increase because it is so much more efficient. The next version of Exponent (v2.3.9) will be released in a few days and supports PHP versions 5.3.x, 5.4.x, 5.5.x, 5.6.x, and 7.0.x and likely supports 7.1.x though testing isn't complete. You can expect Exponent to drop support for PHP v5.3.x very soon, with v5.4.x support not being provided too much longer either.

New Bootstrap3 Dynamic/Drag-n-Drop Form Designer

New Form DesignerThe new v2.3.8 Patch #4 contains an updated form designer for Bootstrap 3 based themes (sorry we're still running into issues on the non-Bootstrap 3 themes). This allows for much easier and quicker form creation and editing. Whereas the previous interface required going back and forth through various screens (page loads), everything now takes place on the main form designer page with updates being performed in the background. What's more...the form designer looks and operates very similar to the previous version.

To add a new control to the form: you simply select a control from the list of controls to the right (or you can change the theme style to place this list on the left if you use a left sidebar) and drag it onto the form in the location you wish to place it. This opens a dialog on the page to enter the details about that control...or you may cancel the action to add the control.

To move a control to a new location: you simply select the control and drag it either up or down and drop it into it's new place.

To remove a control from the form: you can simply select the control and drag it into the trash can above the list of available controls. You may also remove a control by clicking on the red 'delete' button on that control.

New Form Designer​To edit a control on the form: hover over the control and click on the 'edit' button to bring up the control details.

Some other new features include a button to remove the 'design grid' from the display to provide a better idea of what the form will actually look like (this feature is also available on the non-Bootstrap 3 form designer). We've also added a 'switch styles' button to switch between the two basic form styles of having the label above the control or the labels to the left of the controls

All in all this should be a great improvement for those users dealing with the form module.