Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-133596

Accessibility: Support system color appearance and theming in WebAssembly

    XMLWordPrintable

Details

    • Task
    • Resolution: Unresolved
    • P2: Important
    • None
    • None
    • None

    Description

      Make sure to respect system setting in terms of light/dark mode and high contrast.

      High Contrast

      Discussion points:

      • Do we want to go with HightContrast as an flag or enum? It is treated as enum of `{NoPreference, More, Less, Custom}` by W3: https://www.w3.org/TR/mediaqueries-5/#prefers-contrast
        It should probably go into StyleHints, next to ColorScheme
      • Is this orthogonal to `ColorScheme` or part of it? 
        • should be orthogonal so we can express `Dark with high contrast` vs `Light with high contrast`
      • On some systems like Mac high contrast setting is implemented purely by OS and is transparent to an application, we need to take care of respecting that
      • Contrast preference should be read only property? We read it from the system, user should not be able to request it explicitly via Qt API?
      • We need to come up with some API that would encompass wide range of underlying, a11y and high contrast implementation tends to vary a lot

      Practicalities:

      To work efficiently as a team we can divide and structure work into independent pieces which could be parallelized: 

      1. Decide on type of `contrastPreference`, add its implementation to StyleHints.
      2. Provide support of detecting contrast preferences for different platforms:
        1. Windows
        2. Gnome/KDE
        3. WebAssembly
        4. ...
      3. Implement support for contrast preference in platform themes:
        1. Windows
        2. Gnome/KDE
        3. WebAssembly
        4. ...
      4. Implement support for contrast preference in various styles:
        1. Fusion
        2. Adwaita
        3. Windows
        4. ...

      Attachments

        1. NotepadNightSky.png
          73 kB
          Oliver Eftevaag
        2. image-2025-03-11-11-54-10-027.png
          73 kB
          Morten Sørvig

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              piwierci Piotr Wierciński
              sorvig Morten Sørvig
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes