惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Spread Privacy
Spread Privacy
K
Kaspersky official blog
Application and Cybersecurity Blog
Application and Cybersecurity Blog
Forbes - Security
Forbes - Security
Hacker News - Newest:
Hacker News - Newest: "LLM"
The Last Watchdog
The Last Watchdog
SecWiki News
SecWiki News
Attack and Defense Labs
Attack and Defense Labs
Google DeepMind News
Google DeepMind News
Security Archives - TechRepublic
Security Archives - TechRepublic
S
Secure Thoughts
WordPress大学
WordPress大学
Microsoft Security Blog
Microsoft Security Blog
P
Proofpoint News Feed
云风的 BLOG
云风的 BLOG
V
Visual Studio Blog
Security Latest
Security Latest
TaoSecurity Blog
TaoSecurity Blog
Cyberwarzone
Cyberwarzone
S
SegmentFault 最新的问题
Cloudbric
Cloudbric
aimingoo的专栏
aimingoo的专栏
S
Schneier on Security
N
Netflix TechBlog - Medium
MyScale Blog
MyScale Blog
T
The Blog of Author Tim Ferriss
H
Hacker News: Front Page
C
Cybersecurity and Infrastructure Security Agency CISA
小众软件
小众软件
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
AWS News Blog
AWS News Blog
AI
AI
G
GRAHAM CLULEY
IT之家
IT之家
P
Privacy & Cybersecurity Law Blog
L
Lohrmann on Cybersecurity
Last Week in AI
Last Week in AI
D
Docker
Recent Announcements
Recent Announcements
O
OpenAI News
T
Threat Research - Cisco Blogs
GbyAI
GbyAI
S
Security @ Cisco Blogs
T
Troy Hunt's Blog
C
Check Point Blog
博客园 - 三生石上(FineUI控件)
A
About on SuperTechFans
The Cloudflare Blog
阮一峰的网络日志
阮一峰的网络日志
N
News and Events Feed by Topic

TetraLogical Blog

Designing for people with reading disabilities - TetraLogical Designing for people who are D/deaf - TetraLogical Designing accessible documents - TetraLogical Introduction to creating accessible documents - TetraLogical Inclusive user research: vulnerable people - TetraLogical Designing for people who are blind - TetraLogical Designing for people with low vision - TetraLogical Meet the team: Niamh Madden - TetraLogical Designing for people with anxiety - TetraLogical Designing for people with disabilities - TetraLogical Accessible building blocks for the web videos - TetraLogical Common accessibility misconceptions - TetraLogical Common misconceptions about testing accessibility - TetraLogical Common misconceptions about implementing accessibility - TetraLogical Common misconceptions about WCAG - TetraLogical Common misconceptions about disability - TetraLogical Meet the team: Grace Snow - TetraLogical Sustainable accessibility in complex organisations: strategic foundations - TetraLogical Sustainable accessibility in complex organisations: organisational realities - TetraLogical Sustainable accessibility in complex organisations: external factors - TetraLogical Common misconceptions about screen readers - TetraLogical Guide to the Inclusive Design Principles - TetraLogical Meet the team: Ian Lloyd - TetraLogical Annotating designs using common language - TetraLogical Meet the team: Catriona Morrison - TetraLogical Championing inclusive language - TetraLogical Press release: TetraLogical launches accessible self-led training courses to help digital teams build confidence in accessibility - TetraLogical Why inclusive products are green products - TetraLogical Accessible Recruitment - TetraLogical Accessibility and the agentic web - TetraLogical Meet the team: Craig Abbott - TetraLogical Foundations: types of assistive technology and adaptive strategies - TetraLogical European Accessibility Act (EAA) FAQ - TetraLogical Screen reader HTML support tables - TetraLogical Interview with Lola Odelola - TetraLogical Understanding EN 17161 Design for All - TetraLogical Inclusive user research: building rapport - TetraLogical Foundations: Keyboard accessibility - TetraLogical Can generative AI write contextual text descriptions? - TetraLogical Understanding the European Accessibility Act (EAA) - TetraLogical Meet Josh: a sportsman who has spinal muscular atrophy - TetraLogical Meet Jonathan: a photographer who has ADHD - TetraLogical Foundations: grouping forms with `<fieldset>` and `<legend>` - TetraLogical XR Accessibility: for people with moving disabilities - TetraLogical Meet Andre: a music producer and blind screen reader user - TetraLogical Foundations: types of disability - TetraLogical Meet Lauren: a film editor who has ADHD - TetraLogical Meet Steve: a photographer who is deaf and low vision - TetraLogical Foundations: form validation and error messages - TetraLogical Meet Hasmukh: a blind cricketer and screen reader user - TetraLogical XR Accessibility: for people with hearing disabilities - TetraLogical XR Accessibility: for people with thinking disabilities - TetraLogical XR Accessibility: for people with seeing disabilities - TetraLogical Introduction to XR Accessibility - TetraLogical Foundations: labelling text fields with input and label - TetraLogical Design patterns and WCAG - TetraLogical Does WCAG 2.2 apply to native apps - TetraLogical Why are my live regions not working? - TetraLogical Building a culture of accessibility - TetraLogical When to use tabindex= Accessibility foundations - TetraLogical Meet the team: Demelza Feltham - TetraLogical Can generative AI help write accessible code? - TetraLogical Meet the team: Steve Faulkner - TetraLogical Meet the team: Gez Lemon - TetraLogical Keyboard accessibility myths and WCAG - TetraLogical Amendment to the Public Sector Accessibility Regulations - TetraLogical What Considerations for TV user interface accessibility - TetraLogical Meet the team: Alistair Duggin - TetraLogical Sticky content: focus in view - TetraLogical The only accessibility specialist in the room - TetraLogical Meet the team: Ian Pouncey - TetraLogical Meet the team: Dean Holden - TetraLogical Foundations: accessible names and descriptions - TetraLogical Inclusive XR: accessible augmented reality experiences - TetraLogical Foundations: pointer gestures - TetraLogical Meet the team: Graeme Coleman - TetraLogical Adding sign language to videos - TetraLogical Foundations: introduction to WAI-ARIA - TetraLogical Meet the team: Joe Lamyman - TetraLogical Inclusive XR: accessible 3D experiences - TetraLogical Foundations: visible focus styles - TetraLogical Foundations: target sizes - TetraLogical Meet the team: Henny Swan - TetraLogical Meet the team: Ela Gorla - TetraLogical Foundations: native versus custom components - TetraLogical Foundations: HTML semantics - TetraLogical Accessibility and supporting Internet Explorer - TetraLogical Meet the team: Felicity Miners-Jones - TetraLogical Accessibility and QR codes - TetraLogical Inclusive user research: recruiting participants - TetraLogical Research insight: accessibility of images - TetraLogical Meet the team: Léonie Watson - TetraLogical Android accessibility: roles and TalkBack - TetraLogical Accessible design systems - TetraLogical Meet the team: Patrick H. Lauke - TetraLogical Inclusive user research: analysing findings - TetraLogical How to write user stories for accessibility - TetraLogical Triaging WCAG 2.1 Level AAA - TetraLogical
Meeting WCAG Level AAA - TetraLogical
2023-04-21 · via TetraLogical Blog

Posted on by Patrick H. Lauke in Design and development, Standards

Tags: WCAG

In this post, we cover updates we've made to our own site in order to better satisfy the requirements of the Web Content accessibility Guidelines (WCAG) 2.1 Level AAA.

Building on a WCAG 2.1 AAA assessment carried out by independent auditor Mallory van Achterberg in 2019, which included a few issues that had since been resolved, we identified the following shortcomings to fix:

Since the original assessment, we also produced a number of videos that are included in various blog posts. This brought a further consideration under AAA:

Meeting Target Size (Minimum)

Originally, our site featured a few controls/links that did not satisfy the minimum target size requirements of 44×44 CSS pixels.

The social media icon links in the footer – one icon is highlighted, and the developer tools popup shows that the link has a dimension of 25.42×24 pixels
The social media icon links in the footer
The social media icon links in the footer in small-screen/mobile view – one icon is highlighted, and the developer tools popup shows that the link has a dimension of 24.31×24 pixels
The social media icon links in the footer on a small-screen/mobile device

To satisfy the requirements of the success criterion, we made these elements larger. In our case, this was straightforward, as it had minimal impact on our relatively simple layout. All it took were minor CSS changes to set an appropriate minimum width and height.

The social media icon links in the footer – one icon is highlighted, and the developer tools popup shows that the link has a dimension of 44×44 pixels
The social media icon links in the footer, now with increased size and padding
The social media icon links in the footer in small-screen/mobile view – one icon is highlighted, and the developer tools popup shows that the link has a dimension of 44×44 pixels
The social media icon links in the footer on a small-screen/mobile device, now with increased size and padding

Note that the Target Size criterion exempts targets that are in a sentence or block of text, meaning that the majority of links in the main content of our pages are exempt.

Three bullet points, each containing links. One of the links is highlighted, showing that the link's height is 24.67 pixels
A section of our bullet list of services, where each bullet point contains links

Increased text color contrast

It can often be a challenge to find a suitable colour combination that passes the basic AA colour contrast threshold of 4.5:1 while working within the confines of a corporate identity colour palette.

The following table shows the breakdown of TetraLogical's corporate colours, and their colour contrast ratio against the off-white background we use for our site.

Most of our colours are designed to be used against a white/light background and, where necessary, only at large sizes (to satisfy either the 4.5:1 threshold for regular text, or the 3:1 threshold for large text).

In practice, the lighter colours are used for incidental and decorative purposes, and we only use the two colours with the strongest contrast (dark and light purple) for content. However, once we move to AAA, the only viable colour that meets/exceeds the 7:1 contrast threshold is the primary/dark purple one.

If we kept to the corporate identity palette, we would have to remove vibrant/dynamic colours for links and call-to-action buttons, making an almost monochromatic version (as far as text content is concerned) of our site. This makes the site work well for people requiring high contrast, but is less aesthetically pleasing and potentially more tiring and difficult to parse visually for others.

To try and square the circle for this issue, we took a pragmatic approach with our site's styling.

The current draft for CSS Media Queries Level 5 introduces a variety of new media query features, including a query for prefers-contrast. This allows developers to define specific styles based on a person's contrast preference.

We used a @media (prefers-contrast: more) { … } block to redefine specific colour combinations that failed the stricter AAA threshold, such as the colour of links, call-to-action buttons, pagination controls, icon-based social media links, and the various controls in our 3rd party blog comment system.

Here are a few examples showing our site's default styles and how things look when the prefers-contrast: more media query evaluates to true:

Side-by-side comparison of a section of the tetralogical homepage in regular and high contrast mode. In regular mode, links use a light purple colour. In high contrast mode, they use a much darker shade of purple
Comparison of the regular and high contrast text links, button-like call to action links, and social media icon links
Side-by-side comparison of blog pagination links in regular and high contrast mode. In regular mode, the links use white text on a light purple square, and the current page's link uses white text on dark purple. In high contrast mode, the links use white text on dark purple, and the link for the current page uses dark purple text on a white square with a dark purple border
Comparison of the regular and high contrast blog pagination links
Side-by-side comparison of the blog comment form in regular and high contrast mode. In regular mode, the buttons use white text on a light purple background. The table providing basic markdown explanations uses the same whit text on light purple for the column headers, and its code samples use medium gray text on a light gray background with a slightly darker gray border. In high contrast mode, the buttons use the dark purple background. The table uses dark purple as a background for the column headers, and the code samples use a lighter background, but make the text and border much darker
Comparison of the regular and high contrast blog comment form, including the markdown help table
Side-by-side comparison of the blog login modal dialog in regular and high contrast mode. In regular mode, the buttons for Google, Twitter, and Gitlab use white text on bright, highly saturated colour backgrounds. In high contrast mode, the button backgrounds have been darkened to increase the contrast against the white text
Comparison of the regular and high contrast blog login modal dialog

While this media query is well supported in modern browsers (see the "Can I use…" breakdown for prefers-contrast), not all operating systems currently provide an easily-accessible way to set this contrast preference in the first place.

At the time of writing, macOS and iOS have the best implementation for setting this preference at the operating system level. On macOS, the option to "Increase contrast" is found in "Settings > Accessibility > Display", while on iOS it's under "Settings > Accessibility > Display & Text Size".

The settings app on macOS, showing the 'Accessibility > Display' section, with the 'Increase contrast' toggle highlighted. The screenshot shows the effect with the toggle off and on
The "Increase contrast" toggle in macOS' settings
The settings app on iOS, showing the 'Accessibility > Display & Text Size' screen, with the 'Increase contrast' toggle highlighted. The screenshot shows the effect with the toggle off and on
The "Increase Contrast" toggle in iOS' settings

Depending on which particular flavour/distro of Linux you use, a similar OS-level setting is available. For instance, in Ubuntu, you can find a "High Contrast" option in the settings app under "Accessibility > Seeing". At the time of writing, this setting seems to be only supported correctly by Firefox, but there are open bug tickets against other major browsers.

The settings app on Ubuntu, showing the 'Accessibility > Seeing' section, with the 'High Contrast' toggle highlighted. The screenshot shows the effect with the toggle off and on
The "High Contrast" toggle in Ubuntu

There is no separate OS-level option on Windows to set a preference for higher contrast. Instead, Windows 11 settings offer "Contrast themes" in the "Accessibility" section. A subtly renamed take on Windows' classic "High Contrast Mode", this allows people to choose from a series of predefined colour schemes with more distinct colours.

The settings app on Windows, showing the 'Accessibility > Contrast themes' screen. The screenshot shows the effect of selecting and applying one of the themes, 'Desert'
"Contrast themes" in Windows 11's accessibility settings

Applying a contrast theme does result in the prefers-contrast: more media query evaluating to true (which can be verified with a simple test such as this Media Queries Level 5 user preference test). However, just as with the "Windows High Contrast Mode" (WHCM) of old, this setting also forces most foreground and background colours to be replaced with the theme colours, so our high contrast tweaks are not actually displayed, nor necessary.

Screenshot showing the 'hello@tetralogical.com' call to action link displayed with turquoise text and a matching border on an off-white background, and the social media icons in the footer using the same turquoise colour
The "Contact us" section and footer of the TetraLogical homepage, with the contrast themes' colours applied

Authors do have a small amount of control over which are used when in high contrast/contrast theme mode using the force-colors: active media query. We'll cover this in a separate blog post.

Lastly, Android currently lacks any support for setting high contrast. While there is a "High contrast text" toggle in "Settings > Display > Display size and text" in the default Android OS and an equivalent "High contrast fonts" toggle in "Settings > Accessibility > Visibility Enhancements" on the popular Samsung-flavoured version of Android OS, these settings only affect the operating system itself. Regardless of this OS-level setting, browsers on Android always report prefers-contrast: no-preference, and the custom prefers-contrast: more styles are not applied.

The settings app on default Android OS, showing the 'Display > Display size and text' screen, with the 'High contrast text' toggle highlighted. The screenshot shows the effect with the toggle off and on
The "High contrast text" toggle in Android's "Display size and text" settings

While the current approach of having the AAA-conforming contrast ratio on-demand only, dependent on the prefers-contrast: more media query feature, only has partial support, it does strike a pragmatic balance between the needs of people that require very strong contrast, and those who find lower contrast and a more varied use of colour to distinguish page elements (e.g. static text from links), easier to read and understand. Support for this feature will improve as operating systems and browsers implement and/or surface this user preference.

Sign language versions of our videos

The most recent change to our site centred on the various videos we use in blog posts and as learning resources. Per 1.2.6 Sign Language (Prerecorded), we provided versions of our videos which include sign language interpretation.

As we don't have the necessary resources in-house, we used a dedicated company specialising in sign language content creation to create signed versions of our videos. We also included links to the signed versions wherever we had previously embedded the non-signed versions.

Still from the 'Browsing with a desktop screen reader' video, showing the video title and TetraLogical logo, with a superimposed sign language interpreter on the bottom right of the video
One of TetraLogical's "Browsing with…" videos with a sign language interpreter

For more information on this, see our recent blog post Adding sign language to videos.

Summary

This post gave an insight into how we updated our site to meet WCAG 2.1 Level AAA requirements for:

  • Target size
  • Colour contrast requirements
  • Sign language support for video

More information

Next steps

For more information about the Web Content Accessibility Guidelines, read our WCAG primer or browse our training courses and training programmes.