Accessibility Tools

The roking-a11y module is a collection of accessibility tools that can be run in a browser with JavaScript using the links below.

ROKING-A11Y APCA Evaluator

The Advanced Perceptual Contrast Algorithm (APCA) was developed to take into consideration how colors are perceived. This approach avoids what has become known as "the orange button problem". To demonstrate the orange button problem, consider the two following buttons. The button labeled LCR 6.44:1 has a higher Luminance Contrast Ratio than the button labeled LCR 3.26:1. In fact, the lower contrast of white on orange would not pass the WCAG 2.x test for contrast for text, even though it typically appears to be more readable than the higher contrast black on orange.

As a factor in the legibility of text is the font size and weight in relation to the contrast, the APCA Evaluator compares font size and weight to the required contrast level. The APCA Evaluator is, therefore, a design tool that will allow you to evaluate whether the font size is appropriate for the given lightness contrast between two colors.

Please note that the Advanced Perceptual Contrast Algorithm (APCA) is an experimental approach, and should not be used to determine conformance to WCAG 2.x. Additionally, the code provided in the Evaluator may not conform to the most recent official version, resulting in different contrast values when compared to other versions of the algorithm.

The ROKING-A11Y APCA Evaluator tool

ROKING-A11Y Color Tuner

The Color Tuner is a design tool that allows you to see, and select, accessible foreground and background colors by calculating and displaying the contrast ratio for colors as well as modifying foreground and background colors to meet accessibilityguidelines for luminance contrast (WCAG 2.1, Guideline 1.4, Success Criterion 1.4.3 and Success Criterion 1.4.6).

The ROKING-A11Y Color Tuner tool

ROKING-A11Y Palette Tuner

Along with the Color Tuner, the Palette Tuner allows you to evaluate the contrast of an entire palette at one time.

The ROKING-A11Y Palette Tuner tool

ROKING-A11Y Readability Tool

There are several methods by which the readability of a text can be assessed. In the US, the Flesch-Kincaid Grade Level is the most common readability score; however, some will use the Flesch Reading Ease to evaluate English language resources.

Most assessment methods require data beyond the text itself - either the number of syllables a word contains or the part of speech a word is, or even its place in a dependency tree. Of the various assessment methods, the most reliable analysis, aside from a human assessment, is an assessment based on ratios between parts of speech, such as nouns, pronouns, adverbs, and verbs, which matches human assessments 96 to 97 percent of the time. A dependency distance assessment (Liu, 2008) is the next best analysis with approximately 89 percent accuracy. Unfortunately, both - a parts-of-speech analysis and a dependency distance analysis - require a dictionary and/or dependency map for each language or text analyzed, and the analysis takes more than the few seconds the simpler, shallow feature assessments. The result of this need for extra data is that the methods do not lend themselves to a quick estimation of the readability of a text, and are difficult, or impossible, to automate. Further, and perhaps more significantly, these analysis methods are each tied to a single language.

From an accessibility evaluation perspective, a method that is accurate, fast, not language dependent, and capable of being automated, is a better option.

Reliability of the Läsbarhetsindex and Ordvariationsindex

Two shallow feature assessments, the Läsbarhetsindex, or LIX, and the Ordvariationsindex, or OVIX, have shown approximately the same level of accuracy compared to human assessment as a dependency distance analysis, at 85 and 86 percent accuracy, respectively.

Neither the Läsbarhetsindex, developed by Carl-Hugo Björnsson in the late 1960s, nearly a decade prior to the readability tests that were developed by Drs. Flesch and Kincaid, i.e., the Flesch Reading Ease and the Flesch-Kincaid Grade Level, nor the Ordvariationsindex, is tied to a single language by using a syllable count to determine word complexity - the LIX uses word length to determine word complexity, and the Ordvariationsindex measures the number of unique words in a passage.

The reason this is important can be demonstrated by examining two short sentences - one in English and the other in Spanish - "drink this medicine" and "tomar este medicina" and passing them through the Flesch Reading Ease test and the LIX to see if the readability scores are significantly different or close.

Both phrases, "drink this medicine" and "tomar este medicina", are three words in one sentence and, using the LIX measure, each contains one complex word. Where they differ significantly, however, is in the syllable count - the English phrase contains five syllables and the Spanish phrase contains eight. When we compute the Flesch Reading Ease for these phrases, we get a score of 62.9 for the English phrase and a score of -21.8 for the Spanish phrase. Their LIX scores, however, are both 36.3.

The higher the Flesch Reading Ease score, and the lower a LIX score, the easier text is to read. A Flesch Reading Ease score that falls between 60 and 70, as the score for the English phrase does, should correspond to a eigth or ninth grade reading level. A Flesch Reading Ease score that falls between 0 and 30, which is still much higher than the score for the Spanish phrase, should correspond to a college graduate reading level and is considered very difficult to read. A LIX score of 50 for US English, on the other hand, should correspond to a first or second grade reading level.

Both LIX scores are well within the correct range, and use a method to calculate readability that is accurate, fast, language-independent, and is capable of being automated. For these reasons, the ROKING-A11Y Readability Tool uses LIX.

References (Links open in a new window)

  1. Johan Falkenjack and Arne Jönsson. 2014. Classifying easy-to-read texts without parsing. Proceedings of the 3rd Workshop on Predicting and Improving Text Readability for Target Reader Populations (PITR) at EACL 2014:114-122.
  2. Haitao Liu. 2008. Dependency distance as a metric of language comprehension difficulty. Journal of Cognitive Science, 9(2):169–191.

Caveats

There are US jurisdictions in which a maximum reading grade level is established for content. The LIX cannot be used in those situations, you must use the Flesch-Kincaid Grade Level. There have not been an adequate number of samples used to determine if there is a relationship between the LIX and reading grade level, so if reading grade level is important in your consideration, it is recommended that you use the Flesch-Kincaid Grade Level and note that its results apply only to English text.

Some samples are too short to accurately measure. For this reason, the ROKING-A11Y Readability Tool will only score samples containing more than five words.

Simple readability tests such as the Flesch-Kincaid Grade Level, LIX, or OVIX, provide a quick analysis; however, a quick analysis, by its nature, lacks depth. A readability analysis should always be considered alongside the text and the context in which the text is presented, and with the understanding that not all readers are alike. For example, a document containing highly-specialized language or jargon may not be comprehensible even though its score indicates otherwise.

The ROKING-A11Y Readability Tool