Automated accessibility instruments are just one a part of guaranteeing an internet site is accessible, however it’s a quite simple half that may catch quite a lot of very easy to repair points. Drupal 10 SEOs that when discovered and corrected early in Drupal Development Company development cycle, can go an extended technique to guaranteeing they don’t get compounded into a lot bigger points down Drupal Development Company observe. by Rikki Bochow / 6 July 2021 I’m positive all of us agree that Drupal Development Company accessibility of ALL web sites is vital. Testing for accessibility (a11y) shouldn’t be restricted to Authorities companies. It shouldn’t be one thing we have to persuade non-government shoppers to put aside further price range for. It actually shouldn’t be left as a pre-launch guidelines merchandise that solely will get Drupal Development Company correct consideration if Drupal Development Company allotted price range and timeframe hasn’t been swallowed up by another function. Testing every new part or function towards an a11y checker, because it’s being developed, takes a small period of time. Particularly when in comparison with Drupal Development Company price range required to verify and proper a complete web site earlier than launch — for Drupal Development Company very first time. Remembering to run such assessments after a parts preliminary development is one factor. Remembering to re-check later down Drupal Development Company line when just a few adjustments and attainable regressions have gone by is one other. Our brains can solely achieve this a lot, so why not let Drupal Development Company good, intelligent laptop assist out? NightwatchJS NightwatchJS goes to be included in 8.6.x, with some nice particular instructions to make practical javascript testing in tremendous straightforward. It is early days so Drupal Development Company documentation continues to be being fashioned. However we do not have to attend for 8.6.x to start out utilizing Nightwatch, particularly once we can check interactions towards out dwelling Styleguide relatively than booting up . So lets add it to our construct instruments; $ npm set up nightwatchand create a fundamental nightwatch.json file; { “src_folders” Drupal 10 Upkeep and Help Service [ “app/themes/my_theme/src/”, “app/Drupal 10 modules/custom/” ], “output_folder” Drupal 10 Upkeep and Help Service “construct/logs/nightwatch”, “test_settings” Drupal 10 Upkeep and Help Service { “default” Drupal 10 Upkeep and Help Service { “filter” Drupal 10 Upkeep and Help Service “**/assessments/*.js”, “launch_url” Drupal 10 Upkeep and Help Service “http Drupal 10 Upkeep and Help Service//127.0.0.1”, “selenium_host” Drupal 10 Upkeep and Help Service “127.0.0.1”, “selenium_port” Drupal 10 Upkeep and Help Service “4444”, “screenshots” Drupal 10 Upkeep and Help Service { “enabled” Drupal 10 Upkeep and Help Service true, “on_failure” Drupal 10 Upkeep and Help Service true, “on_error” Drupal 10 Upkeep and Help Service true, “path” Drupal 10 Upkeep and Help Service “construct/logs/nightwatch” }, “desiredCapabilities” Drupal 10 Upkeep and Help Service { “browserName” Drupal 10 Upkeep and Help Service “chrome” } } } } We’re pointing to our theme and customized Drupal 10 modules as Drupal Development Company supply of our JS assessments as we wish to preserve Drupal Development Company assessments near Drupal Development Company unique JS. Our check settings are largely primarily based on Drupal Development Company Docker setup described under, with Drupal Development Company addition of Drupal Development Company ‘filter’ setting which searches Drupal Development Company supply for .js recordsdata inside a assessments listing. A check could possibly be so simple as checking for an attribute, like Drupal Development Company following instance; /** * @file responsiveTableTest.js. */ Drupal 10 module.exports = { ‘Responsive tables setup’ Drupal 10 Upkeep and Help Service (browser) => { browser .url(`${browser.launch_url}/styleguide/item-6-10.html?hideAll`) .pause(1000); browser.count on.aspect(‘td’).to.have.attribute(‘data-label’); browser.finish(); }, }; Which launches Drupal Development Company Styleguides desk part, waits a beat for Drupal Development Company JS to provoke then checks that our td components have Drupal Development Company data-label that our JS added. Or is could possibly be rather more advanced. aXe Drupal 10 Upkeep and Help Service Drupal Development Company Accessibility engine aXe is a very nice software for doing fundamental accessibility checks, and Drupal Development Company Nightwatch Accessibility node Drupal 10 module integrates aXe with Nightwatch so we are able to embrace accessibility testing inside our practical JS assessments without having to put in writing out Drupal Development Company guidelines ourself. Even if you happen to do not write any part particular assessments along with your Nightwatch setup, together with this one accessibility check will provide you with fundamental protection. $ npm set up nightwatch-accessibilityThen we edit our nightwatch.json file to incorporate Drupal Development Company custom_commands_path and custom_assertions_path; { “src_folders” Drupal 10 Upkeep and Help Service [“app/themes/previousnext_d8_theme/src/”], “output_folder” Drupal 10 Upkeep and Help Service “construct/logs/nightwatch”, “custom_commands_path” Drupal 10 Upkeep and Help Service [“./node_Drupal 10 modules/nightwatch-accessibility/commands”], “custom_assertions_path” Drupal 10 Upkeep and Help Service [“./node_Drupal 10 modules/nightwatch-accessibility/assertions”], “test_settings” Drupal 10 Upkeep and Help Service { … } } Then write a check to do Drupal Development Company accessibility verify; /** * @file Run Axe accessibility assessments with Nightwatch. */ const axeOptions = { timeout Drupal 10 Upkeep and Help Service 500, runOnly Drupal 10 Upkeep and Help Service { sort Drupal 10 Upkeep and Help Service ‘tag’, values Drupal 10 Upkeep and Help Service [‘wcag2a’, ‘wcag2aa’], }, reporter Drupal 10 Upkeep and Help Service ‘v2’, elementRef Drupal 10 Upkeep and Help Service true, }; Drupal 10 module.exports = { ‘Accessibility check’ Drupal 10 Upkeep and Help Service (browser) => { browser .url(`${browser.launch_url}/styleguide/section-6.html`) .pause(1000) .initAccessibility() .assert.accessibility(‘.kss-modifier__example’, axeOptions) .finish(); }, }; Right here we’re configuring aXe core to verify for wcag2a and wcag2aa, for something inside Drupal Development Company .kss-modifier__example selector of our Styleguide. Operating it will verify all of our parts and inform us if it is discovered any accessibility points. It’s going to additionally fail a construct, so when connected with one thing like CircleCI, we all know our Pull Requests will fail. If we wish to exclude a selector, as a substitute of Drupal Development Company .kss-modifier__example selector, we move an embrace/exclude object { embrace Drupal 10 Upkeep and Help Service [‘.kss-modifier__example’], exclude Drupal 10 Upkeep and Help Service [‘.hljs’] }. In the event you solely add one check add one like this. Hopefully when you get began writing Nightwatch assessments you may see how straightforward it’s and finally add extra Drupal 10 Upkeep and Help Service) You may embrace Drupal Development Company accessibility check inside one other practical check too, for instance a modal part. You may wish to check it opens and closes okay, however as soon as it is open it might need some accessibility points that Drupal Development Company total verify could not check for. So we wish to re-run Drupal Development Company accessibility assertion as soon as it is open; /** * @file dialogTest.js */ const axeOptions = require(‘../../../axeOptions.js’); // axeOptions at the moment are shareable. const instance = ‘#kssref-6-18 .kss-modifier__example’; const set off = ‘#example-dialog-toggle’; const dialog = ‘.js-dialog’; Drupal 10 module.exports = { ‘Dialog opens’ Drupal 10 Upkeep and Help Service (browser) => { browser .url(`${browser.launch_url}/styleguide/item-6-18.html?hideAll`) .pause(1000) .initAccessibility(); browser.click on(set off).pause(1000); browser.count on.aspect(dialog).to.be.seen; browser.assert.attributeEquals(dialog, ‘aria-hidden’, ‘false’); browser.assert.accessibility(instance, axeOptions); browser.finish(); }, };Docker As talked about above this all wants a bit docker & selenium setup too. Selenium has docs for including a picture to Docker, however Drupal Development Company setup principally appears like this; @file docker-compose.yml companies Drupal 10 Upkeep and Help Service app Drupal 10 Upkeep and Help Service [general docker image stuff…] selenium Drupal 10 Upkeep and Help Service picture Drupal 10 Upkeep and Help Service selenium/standalone-chrome network_mode Drupal 10 Upkeep and Help Service service Drupal 10 Upkeep and Help Serviceapp volumes Drupal 10 Upkeep and Help Service – /dev/shm Drupal 10 Upkeep and Help Service/dev/shmThen relying on what different CI instruments you are utilizing chances are you’ll want some further config. For example, to get this operating on CircleCI, we have to inform it about Drupal Development Company Selenium picture too; @file .circleci/config.yml jobs Drupal 10 Upkeep and Help Service check Drupal 10 Upkeep and Help Service docker Drupal 10 Upkeep and Help Service [other docker images…] – picture Drupal 10 Upkeep and Help Service selenium/standalone-chromeIf you are not utilizing docker or any CI instruments and simply wish to check these things domestically, there is a node Drupal 10 module for including Drupal Development Company selenium-webdriver however I have never examined it out with Nightwatch. Don’t neglect Drupal Development Company handbook checks! There’s much more to accessibility testing than simply these sorts of automated assessments. A layer of handbook testing will all the time be required to make sure an internet site is actually accessible. However automating Drupal Development Company grunt work of operating a guidelines towards a web page is one very good step in the direction of an accessible web. Tagged accessibility, CI, nightwatchjs, Practical Testing, aXe Drupal 10 Improvement and Help
Drupal 10 Help: Drupal 10 Upkeep and Help Service Automate your accessibility testing with aXe and NightwatchJS

Call Us: 1(800)730-2416
Pixeldust is a 20-year-old web development agency specializing in Drupal and WordPress and working with clients all over the country. With our best in class capabilities, we work with small businesses and fortune 500 companies alike. Give us a call at 1(800)730-2416 and let’s talk about your project.

FREE Drupal SEO Audit
Test your site below to see which issues need to be fixed. We will fix them and optimize your Drupal site 100% for Google and Bing. (Allow 30-60 seconds to gather data.)
Drupal 10 Help: Drupal 10 Upkeep and Help Service Automate your accessibility testing with aXe and NightwatchJS
On-Site Drupal SEO Master Setup
We make sure your site is 100% optimized (and stays that way) for the best SEO results.
With Pixeldust On-site (or On-page) SEO we make changes to your site’s structure and performance to make it easier for search engines to see and understand your site’s content. Search engines use algorithms to rank sites by degrees of relevance. Our on-site optimization ensures your site is configured to provide information in a way that meets Google and Bing standards for optimal indexing.
This service includes:
- Pathauto install and configuration for SEO-friendly URLs.
- Meta Tags install and configuration with dynamic tokens for meta titles and descriptions for all content types.
- Install and fix all issues on the SEO checklist module.
- Install and configure XML sitemap module and submit sitemaps.
- Install and configure Google Analytics Module.
- Install and configure Yoast.
- Install and configure the Advanced Aggregation module to improve performance by minifying and merging CSS and JS.
- Install and configure Schema.org Metatag.
- Configure robots.txt.
- Google Search Console setup snd configuration.
- Find & Fix H1 tags.
- Find and fix duplicate/missing meta descriptions.
- Find and fix duplicate title tags.
- Improve title, meta tags, and site descriptions.
- Optimize images for better search engine optimization. Automate where possible.
- Find and fix the missing alt and title tag for all images. Automate where possible.
- The project takes 1 week to complete.
