Testing Visio shape text for WCAG 2.0 pass

The Web Content Access Guidelines (WCAG) 2.0 provides the current recommendations for making web content accessible to users with vision impairment, but how do you test if your Visio shapes pass? There are several web sites out there that provide this capability, but all of them require the HEX values, rather than the RGB or HSL that Visio provides natively. Therefore, I have created a Visio callout shape that can be associated with a target shape to report on the values of each of its main color elements, and provides hyperlinks to automatically check the contrast ratio on WebAIM.

Color Values Shape

The colour formats that can be selected from either the Shape Data window or the right mouse menu are:

  • RGB – The Red, Gren, Blue formula
  • HSL – The Hue, Saturation, Luminosity formula
  • HEX – The web hexadecimal format
  • MAP – The Visio document color map number

This special shape is possible because of the special capabilities of the callout. It can reference the values in cells of the target shape that it is associated with. In this case, there is a list of target cells available from either the Shape Data window or from the right mouse menu:

  • FillForegnd – The fill color if the Solid fill pattern
  • FillBgnd – The second fill colour for non-solid pattern fills
  • LineColor – The colour of the lines
  • Char.Color – The text or font colour
  • TextBkgnd – The optional text background colour

The Target Value Shape Data row then displays the read-only value of the selected Target Cell in the selected Color Format.

The Color Values shape also has a Shape Data or right mouse menu option to Hide Leader Line.

The shape then contains three hyperlinks that opens the WebAIM Contrast Checker:

  • WebAIM (fill vs target font color) – Checks the Color Value shape fill colour vs the target shape text colour
  • WebAIM (fill vs black font color) – Checks the Color Value shape fill colour vs the black text colour, which is the preferred one
  • WebAIM (fill vs white font color) – Checks the Color Value shape fill colour vs the white text colour, which is the second preference if black fails

This slideshow requires JavaScript.

Check out WebAIMContrast Checker

There is one other hyperlink:

  • Donate to bVisual – Provides the opportunity to encourage me to create more useful shapes

The Color Value shape can easily be used by simply downloading the Color Values stencil into your <documents>/My Shapes folder.

Then simply drag and drop the Color Values shape on to the shape you wish to check, or drop the shape near by and drag the yellow control handle onto the target shape.

Select the Color Format and Target Cell to read the value of, and follow one of the hyperlinks to check the compliance of the selected fill and font colour.

If your shape uses no fill, pattern fill or gradient fill, then consider having a solid text background color.

Note, that this Color Values callout shape can only read the color values of the top-most shape of a group shape, and it does not take any transparency into consideration.

Related articles:

Ensuring High Contrast Text in Visio Shapes

Formatting SharePoint Columns with RGB Color

A big shout-out to my friend Chris Roth, aka VisGuy, for his inspirational article : Get Web Hex Color Values from Visio Shapes



Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.


O365 and SharePoint

Simplify Tasks

Want to learn the simple way?

Paul Turley's SQL Server BI Blog

sharing my experiences with the Microsoft data platform, SQL Server BI, Data Modeling, SSAS Design, Power Pivot, Power BI, SSRS Advanced Design, Power BI, Dashboards & Visualization since 2009

John Goldsmith's visLog

be smart, be clear, be visual ...

Mo's blog

Personal views on Dynamics 365 for Operations and Technical Architecture.

Chris Webb's BI Blog

Microsoft Power BI, Analysis Services, MDX, DAX, M, Power Pivot and Power Query


Azure Solutions for Office 365, and more...

Rob Fahrni



Life with Visio and other Microsoft Toys!

Nilsandrey's Weblog

Just another WordPress.com weblog

Things that Should be Easy

Every so often (too often in the IT industry) I encounter things that should have been very easy to do but turned out to be far too complicated. My favorite topics include SharePoint, .Net development, and software architecture, especially distributed systems.

Visio Guy

Smart graphics for visual people

%d bloggers like this: