<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>241866</bug_id>
          
          <creation_ts>2022-06-22 13:24:52 -0700</creation_ts>
          <short_desc>Implement AccentColor/AccentColorText</short_desc>
          <delta_ts>2026-07-17 16:45:04 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>CSS</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Bramus">bramus</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>akeerthi</cc>
    
    <cc>bfulgham</cc>
    
    <cc>kiet.ho</cc>
    
    <cc>lwarlow</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>wilander</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1877395</commentid>
    <comment_count>0</comment_count>
    <who name="Bramus">bramus</who>
    <bug_when>2022-06-22 13:24:52 -0700</bug_when>
    <thetext>These were recently added to CSS Color 4 – https://github.com/w3c/csswg-drafts/commit/8c1fe16402cee71211530ef5283a0372c8740e7d

- AccentColor = Background of accented user interface controls.
- AccentColorText = Text of accented user interface controls.

There&apos;s already a `-webkit-focus-ring-color` exposed, so could be aliased. 

Relevant CSS WG Discussions:
- https://github.com/w3c/csswg-drafts/issues/5900
- https://github.com/w3c/csswg-drafts/issues/7347

Other vendor bugs:
- Blink/Chromium: https://bugs.chromium.org/p/chromium/issues/detail?id=1338061
- Gecko/Firefox: https://bugzilla.mozilla.org/show_bug.cgi?id=1775527</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1877399</commentid>
    <comment_count>1</comment_count>
    <who name="Bramus">bramus</who>
    <bug_when>2022-06-22 13:28:43 -0700</bug_when>
    <thetext>Scrap that link to CSSWG issue 5900. Only 7347 is relevant here.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1877536</commentid>
    <comment_count>2</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2022-06-22 18:54:00 -0700</bug_when>
    <thetext>IIRC we don&apos;t expose accent colors to prevent fingerprinting, so while this can be implemented with a fixed value, that wouldn&apos;t be terribly useful.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1877610</commentid>
    <comment_count>3</comment_count>
    <who name="Bramus">bramus</who>
    <bug_when>2022-06-23 02:16:36 -0700</bug_when>
    <thetext>Just checked. `-webkit-focus-ring-color` not exposed indeed. Wrongfully assumed info in the WG issue on that was correct, but it was not.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1879109</commentid>
    <comment_count>4</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2022-06-29 13:25:15 -0700</bug_when>
    <thetext>&lt;rdar://problem/96163997&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1882064</commentid>
    <comment_count>5</comment_count>
    <who name="Luke Warlow">lwarlow</who>
    <bug_when>2022-07-11 09:30:19 -0700</bug_when>
    <thetext>Would there be no way to implement this to be the same colour as `accent-color: auto`, while avoiding fingerprinting?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1882066</commentid>
    <comment_count>6</comment_count>
    <who name="Luke Warlow">lwarlow</who>
    <bug_when>2022-07-11 09:35:11 -0700</bug_when>
    <thetext>Again apologies if I&apos;ve misunderstood but it would seem that `-webkit-focus-ring-color` is exposed.

https://jsfiddle.net/78539gym/</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1882072</commentid>
    <comment_count>7</comment_count>
    <who name="Luke Warlow">lwarlow</who>
    <bug_when>2022-07-11 10:13:11 -0700</bug_when>
    <thetext>Based on this quick test:

https://jsfiddle.net/01vz2osr/

All three browsers expose an OS accent colour derivative, at least on macOS 12.4.

Tested in Chrome Dev 105, Firefox Stable 102, and Safari 15.5.

While they don&apos;t all match each other they&apos;re a derivative of the OS colour so cover the fingerprinting front, even if not necessarily the legitimate use case of trying to style your elements to match `accent-color: auto`.

Also the new AccentColor property can be tested in latest Firefox Nightly, and it exposes the accent colour.

Per discussion in https://github.com/w3c/csswg-drafts/issues/7347 this is correct behaviour.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2231564</commentid>
    <comment_count>8</comment_count>
    <who name="Kiet Ho">kiet.ho</who>
    <bug_when>2026-07-17 16:45:04 -0700</bug_when>
    <thetext>To recap, AccentColor/AccentColorText is already implemented in 254840@main, but it&apos;s hard-coded to a constant instead of following the OS accent color, due to fingerprinting concerns [1]. In the meantime, CSSWG resolves that if `accent-color` is set, `AccentColor` should be that color [2]

[1]: https://github.com/WebKit/standards-positions/issues/136
[2]: https://github.com/w3c/csswg-drafts/issues/5900#issuecomment-2380321760</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>