Articles

You know you want your module/initiative/theme/patch/core contribution to be accessible, but you're not sure how to achieve that.

Drupal’s online documentation is © 2000-2020 by the individual contributors and can be used in accordance with the Creative Commons License, Attribution-ShareAlike 2.0. PHP code is distributed under the GNU General Public License.

Understanding how accessible your module, theme, or site is can feel overwhelming. If you're new to accessibility, the topic alone can leave you wondering where to start. Accommodating a wide range of abilities means considering a diverse range of factors. This documentation outlines essential considerations in a logical, step-by-step process for checking the accessibility of your module's theme or site.

Drupal’s online documentation is © 2000-2020 by the individual contributors and can be used in accordance with the Creative Commons License, Attribution-ShareAlike 2.0. PHP code is distributed under the GNU General Public License.

Join us live on Google Hangout at 9 AM Pacific Time on the last Tuesday of every month.
Temporary change for March 2020: This month’s meeting is moved to 11:30 AM PT on Tuesday, March 24 due to scheduling conflicts.

Drupal’s online documentation is © 2000-2020 by the individual contributors and can be used in accordance with the Creative Commons License, Attribution-ShareAlike 2.0. PHP code is distributed under the GNU General Public License.
Drupal’s online documentation is © 2000-2020 by the individual contributors and can be used in accordance with the Creative Commons License, Attribution-ShareAlike 2.0. PHP code is distributed under the GNU General Public License.

Basics
In Drupal 8, clean URLs are enabled by default and cannot be disabled. However, the rewrite module must be enabled on your web server.
Check your browser's address bar. Your site URLs should not contain ?q= in the URL.
Example of correct “clean URLs”
http://www.example.com/node/83
Example of non-working “clean URLs”
http://www.example.com/?q=node/83
There are additional setup instructions for clean URLs on various systems like Apache, WAMP, XAMPP, and IIS.

Drupal’s online documentation is © 2000-2020 by the individual contributors and can be used in accordance with the Creative Commons License, Attribution-ShareAlike 2.0. PHP code is distributed under the GNU General Public License.

This guide contains tutorials and other information necessary for creating modules for Drupal 8.
Other resources:

Drupal’s online documentation is © 2000-2020 by the individual contributors and can be used in accordance with the Creative Commons License, Attribution-ShareAlike 2.0. PHP code is distributed under the GNU General Public License.

Drupal 8 uses a range of advanced PHP features and sophisticated third-party libraries to provide third-party developers with the most advanced API of any available CMS. While experienced Drupal 7 developers may notice some significant changes, much of the core structure remains familiar.
If any of the material presented in the step-by-step D8 module developer guide is new to you, the resources below may help. However, exhaustive knowledge is not required to proceed to the D8 module walkthrough.

Drupal’s online documentation is © 2000-2020 by the individual contributors and can be used in accordance with the Creative Commons License, Attribution-ShareAlike 2.0. PHP code is distributed under the GNU General Public License.

Main Topic: Project Metadata
The .info.yml file (also known as the "info YAML file") is an essential part of a Drupal 8 module, theme, or installation profile used to store metadata about the project.
These .info.yml files are required to:

Drupal’s online documentation is © 2000-2020 by the individual contributors and can be used in accordance with the Creative Commons License, Attribution-ShareAlike 2.0. PHP code is distributed under the GNU General Public License.

Before You Begin
If you want PHP to help identify your errors on a test site, try the settings described here: Displaying all errors during development.
Name Your Module
The first step in creating a module is to choose a “short name” or machine name for it. This machine name will be used in several files and functions of your module, and the Drupal core uses it programmatically to reference your module.

Drupal’s online documentation is © 2000-2020 by the individual contributors and can be used in accordance with the Creative Commons License, Attribution-ShareAlike 2.0. PHP code is distributed under the GNU General Public License.

In the following subsections of the guide, we will create examples of various parts of a Drupal site, such as a custom page, block, entity, field, etc. All examples start with the module folder and the .info.yml file, and with just these two items the module will appear on the extended Drupal 8 administration page or can be activated directly using Drush.
This subsection will guide you through the process of getting started by creating, naming, and properly placing the .info.yml file, which will become the starting point for each new module you create.

Drupal’s online documentation is © 2000-2020 by the individual contributors and can be used in accordance with the Creative Commons License, Attribution-ShareAlike 2.0. PHP code is distributed under the GNU General Public License.