Skip to content

Does every theme provided by an author need to meet Contrast (Minimum)? #4317

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
mbgower opened this issue Apr 4, 2025 · 17 comments
Open

Comments

@mbgower
Copy link
Contributor

mbgower commented Apr 4, 2025

As a result of discussion concerning #4290, the Task Force is opening a separate issue to discuss whether each variation of a page caused by selecting a theme must independently meet Contrast (Minimum) in order for the page to confirm.

Points to consider include:

@mbgower
Copy link
Contributor Author

mbgower commented Apr 4, 2025

I agree with what I believe were @dbjorge's comments today on this. Only one version of a page needs to meet contrast (and all other) requirements.

A theme is a version of the page, but not a page variation in the sense defined in Note 3 of 5.2.2, which is limited to "each variation of the page that is automatically presented by the page for various screen sizes (e.g. variations in a responsive web page)."

The title (and guidance) of G174 clearly lists a way to meet 1.3.4 by linking to another presentation (aka "theme") that has sufficient contrast.
The test procedure makes it abundantly clear that so long as the mechanism to switch to a different version is itself of sufficient contrast, the rest of a theme does not need to meet Contrast (Minimum). Only one alternative needs to.

Check that a link or control exists on the original page that provides access to the alternate version.
Check that the link or control on the original page conforms to all success criteria for the conformance level being tested.
Check that the alternate version meets the contrast and all other success criteria for the conformance level being tested.

Obviously it is best practice to make each theme meet contrast minimums. That is the way we have designed IBM's Carbon Design System.

@patrickhlauke
Copy link
Member

Agree that in theory, only one user-selectable theme needs to meet contrast (and generally be accessible); as long as the way to switch to the theme is accessible itself, it probably counts as the accessible alternative to the non-compliant other themes

@patrickhlauke
Copy link
Member

While only tenuous, as there it applies to authoring tools, i'm reminded of EN 301 549 11.8.5 Templates

When an authoring tool provides templates, at least one template that supports the creation of content that conforms to the requirements of clauses 9 (Web content) or 10 (Non-Web content) as applicable shall be available and identified as such.

@scottaohara
Copy link
Member

i think there's probably still debate that should be had on whether light mode vs dark mode is considered a theme or not. there's no linking to a dark mode if basing that variation of the design off a user's preferred mode. And, I think it'd be a very unfortunate problem to have to solve if people were like "well my default mode is dark mode for my OS and thus my browser - and we made sure our dark mode meets contrast..... so we don't need our light mode to meet contrast...."

this game can be spun to go both ways.

@patrickhlauke
Copy link
Member

patrickhlauke commented Apr 4, 2025

i think there's probably still debate that should be had on whether light mode vs dark mode is considered a theme or not. there's no linking to a dark mode if basing that variation of the design off a user's preferred mode.

oh for sure, i'd say it's only acceptable if there's still a way for the user to switch between light/dark mode on the specific site, without requiring them to change their preference at the whole browser or OS level. by all means use the user preference to inform which one is shown on first visit by default, but provide a switch that overrides the browser/OS setting.

@bruce-usab
Copy link
Contributor

Noting that per 5.2 Conformance Requirements, a single conforming alternative version satisfies a success criterion. OP is an easy yes/no question strictly in the context of WCAG 2.x.

As of June 24, U.S. state and local government entities (with populations of 50,000 or more persons) are to use CAV (see 35.202 in the final rule) “only where it is not possible to make web content directly accessible due to technical or legal limitations.” OP is still an easy yes/no question for entities covered by this new ADA regulation for web sites and mobile apps. But the answer flips from "no" to "yes"!

@TestPartners
Copy link

TestPartners commented Apr 8, 2025 via email

@bruce-usab
Copy link
Contributor

I have taken us off topic, so my apologies for that. I took the liberty to trim emails cruft from reply immediately above.

I don’t agree with your interpretation of 35.202. As long as the primary version is conformant, it does not require alternate versions to be conformant. In fact, they are irrelevant in terms of that paragraph.

I like your reading better than mine!

However, 35.203 requires that “alternative designs, methods, or techniques result in substantially equivalent or greater accessibility and usability”. That is rather unhelpful because it does not say that they have to be fully conformant.

They definitely would not have be fully conformant to assert equivalent facilitation. Otherwise one would not bother with claiming equivalent facilitation, as it would not be necessary.

They could have just said “equivalent”, but they chose to introduce a level of ambiguity for some reason.

The phrasing is common to regulation for the built environment (and elsewhere). For example, see 2010 ADA Design Standards 103 Equivalent Facilitation 103. It would have introduce more ambiguity if they had not included it!

@mbgower
Copy link
Contributor Author

mbgower commented Apr 14, 2025

It seems like we have overall agreement that only one version needs to meet Contrast (Minimum), so long as there is a mechanism from all versions that guides users to the conforming version and that mechanism itself meets contrast.

Does anyone think we need additional information to that effect included in any documentation? If so, please feel free to generate a PR for review. Otherwise, I believe this can be closed.

@scottaohara
Copy link
Member

and what if there isn't a mechanism?

including the toggle seemed to just veer this conversation back into these being themes for the user to choose. So my read on that is that if there isn't a mechanism, and the mode of the website is adapting to the user's OS preference - and there is no toggle to switch it back without a user having to change the mode at the OS level, then whatever style is shown (dark or light) will need to meet contrast requirements.

@TestPartners
Copy link

I agree with Scott. I recently wrote the following guidance for our team: "If an alternative colour scheme is automatically activated, and there is no provision to change it manually, you must do the colour contrast and non-text contrast testing using both colour schemes."

@GreggVan
Copy link

GreggVan commented May 1, 2025

The alternate page part of the conformance does not require that the accessible version either be the default or (obviously) be all versions.

So from that language -- it is ok if the default does not pass as long as

  1. the alternative does
  2. and the means to get to the alternate versio is accessible

@electrickite
Copy link

Noting that the question of whether "light/dark modes" are alternative versions or variations was also discussed in #2889. I agree with @scottaohara - if there is no mechanism provided by the author to switch color schemes, then any color scheme that can be presented to a user by default should be considered a page variation when considering section 5.2.2 full page conformance. This would imply that these color schemes each need to meet contrast minimums and any other color-based SC.

@erikkroes
Copy link

erikkroes commented May 6, 2025

I think I'm missing one thing in this discussion. Shouldn't it be indicated which versions have sufficient contrast?

The most important part of providing a conforming alternate version is providing a mechanism to find it from the non-conforming version.

@patrickhlauke
Copy link
Member

Shouldn't it be indicated which versions have sufficient contrast?

there's no requirement to explicitly identify it. The original wording in WCAG tacitly assumes (at least that's my impression) that there's at most two version ... if you somehow end up on the non-conformant one, it assumes you find a switch/mechanism to go to the "other" one.

@erikkroes
Copy link

What you say aligns with my mental model. I thought there was something need to specify or mark conformant versions. (Also sounds rather practical. If a website has many themes, you don't want to go through them all to find the conformant one(s).)

@detlevhfischer
Copy link
Contributor

detlevhfischer commented May 16, 2025

@patrickhlauke wrote above:

i'd say it's only acceptable if there's still a way for the user to switch between light/dark mode on the specific site, without requiring them to change their preference at the whole browser or OS level.

Looking at the normative text in section 5.2.1 that allows an accessibility-supported mechanism to bring up the CAV, and allows for such a mechanism to reside on the platform or user agent level, it is not immediately clear that the a link to the alternative mode (while certainly best practice) would actually be required on the specfic site.

It seems to boil down to the interpretation of accessibility-supported mechanism - if that implies meeting all SCs at the chosen level of conformance, is it clear (enough) to users that switching from light to dark mode in the OS or UA (or vice versa) in order to get a version with sufficient contrast would meet the 2.4.4 (purpose of link can be determined) or 2.4.6 (label describes topic or purpose) aspect of that mechanism? Faced with bad contrast in the mode served based on my OS preferences, picking the other mode in the hope of better contrast there would not strike me as obvious.

The situation would be different with OS (or UA) settings that explicitly say "Increase contrast" - as is the case for iOS.

That also relates to the question @erikkroes asked above - is saying on that mechanism that it will take you to the conformant version not implicitly required to meet 2.4.4/2.4.6, and would it not by the same token mark the version you go to as the conformant one?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants