Metric: Spelling

Skill Level: 
Appropriate for all

The spelling metric is meant to find english spelling errors on your pages. To accomplish this, the metric grabs every text node and alternative text attribute (for example alt and aria-label) on a page after JavaScript and CSS has been executed, then the metric does some further processing (which we discuss later), and finally the remaining words are compared against several dictionaries.

The spelling metric is meant to catch obvious spelling errors and there is no guarantee that it will catch every spelling error on your site.

This metric is undergoing beta testing and will not affect your page score.

Overrides

This metric creates errors and allows for those errors to be overridden. Once enough sites have created a site-wide override for the same word, that word will be added as a global override and added to a custom dictionary.

Dictionary sources

It uses a variety of dictionary sources to reduce the number of times you have to override an error. The following is a list of those sources.

  • The SCOWL large english dictionary
  • Wordnik, which itself uses multiple sources
  • U.S. government first and last name data to reduce the number of names that are marked as spelling errors
  • A custom dictionary built on your overrides

Ignored elements and patterns

The metric ignores several elements and patterns to make it easier for you to find and fix actual problems. The following is a list of those rules.

Ignored Elements

  • <style>
  • <noscript>
  • <code>
  • <script>
  • <abbr>
  • <data>
  • <time>
  • <ruby>
  • <rb>
  • <rt>
  • <rtc>
  • <var>
  • <param>
  • <source>
  • <canvas>
  • <template>
  • <sup>

Ignored Patterns

  • email addresses
  • URLs
  • file names
  • words that have a period or @ symbol in them (similar to URLs, filenames, or email addresses, but don't conform to those exact patterns).
  • words that contain an uppercase character after the first character (ignores acronyms that are uppercase like BBC, and words like MediaHub).
  • content that is not English as defined by the HTML lang attribute.
  • any content that has a data-sitemaster-ignore-spelling attribute, usually used to ignore example/filler text during development. This will result in a notice.

Pattens that are changed

  • Smart quotes are converted to normal quotes before any processing takes place
  • Ligatures are converted to their ASCII equivalent characters
Contributed By: 
IIM