prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  White on Yellow?? Color Contrast
  **CKAN version**
  https://demo.ckan.org/en/user/edit/mgifford
  
  **Describe the bug**
  Title: WCAG 1.4.3: Ensures the contrast between foreground and background colors meets WCAG 2 AA contrast ratio thresholds (.btn-warning)
  Tags: Accessibility, WCAG 1.4.3, color-contrast
  
  Issue: Ensures the contrast between foreground and background colors meets WCAG 2 AA contrast ratio thresholds (color-contrast - https://accessibilityinsights.io/info-examples/web/color-contrast)
  
  Target application: Manage - mgifford - Users - CKAN Demo - https://demo.ckan.org/en/user/edit/mgifford
  
  Element path: .btn-warning
  
  Snippet: <a class="btn btn-warning" href="/en/user/generate_key/b8037a86-a216-4c9b-8211-e197fa09143a" data-module="confirm-action" data-module-content="Are you sure you want to regenerate the API key?">Regenerate API Key</a>
  
  How to fix: 
  Fix any of the following:
    Element has insufficient color contrast of 1.94 (foreground color: #ffffff, background color: #f0ad4e, font size: 10.5pt (14px), font weight: bold). Expected contrast ratio of 4.5:1
  
  Environment: Microsoft Edge version 107.0.1418.35
  
  ====
  
  This accessibility issue was found using Accessibility Insights for Web 2.35.0 (axe-core 4.4.1), a tool that helps find and fix accessibility issues. Get more information & download this tool at http://aka.ms/AccessibilityInsights.
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `ckan/cli/sass.py`
  Content:
  ```
  1 # encoding: utf-8
  2 from __future__ import annotations
  3 
  4 import subprocess
  5 import os
  6 
  7 import click
  8 import six
  9 
  10 from ckan.common import config
  11 
  12 
  13 @click.command(
  14     name=u'sass',
  15     short_help=u'Compile all root sass documents into their CSS counterparts')
  16 def sass():
  17     command = (u'npm', u'run', u'build')
  18 
  19     public = config.get_value(u'ckan.base_public_folder')
  20 
  21     root = os.path.join(os.path.dirname(__file__), u'..', public, u'base')
  22     root = os.path.abspath(root)
  23     _compile_sass(root, command, u'main')
  24 
  25 
  26 def _compile_sass(root: str, command: tuple[str, ...], color: str):
  27     click.echo(u'compile {}.css'.format(color))
  28     command = command + (u'--', u'--' + color)
  29 
  30     process = subprocess.Popen(
  31         command,
  32         stdout=subprocess.PIPE,
  33         stderr=subprocess.PIPE)
  34     output = process.communicate()
  35     for block in output:
  36         click.echo(six.ensure_text(block))
  37
  ```
  --- END FILES ---
  
  Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.
  
  Here is an example:
  
  ```diff
  diff --git a/examples/server_async.py b/examples/server_async.py
  --- a/examples/server_async.py
  +++ b/examples/server_async.py
  @@ -313,4 +313,4 @@
   
   
   if __name__ == "__main__":
  -    asyncio.run(run_async_server("."), debug=True)
  +    asyncio.run(run_async_server(), debug=True)
  diff --git a/examples/server_sync.py b/examples/server_sync.py
  --- a/examples/server_sync.py
  +++ b/examples/server_sync.py
  @@ -313,5 +313,5 @@
   
   
   if __name__ == "__main__":
  -    server = run_sync_server(".")
  +    server = run_sync_server()
       server.shutdown()
  
  ```
  
golden_diff: diff --git a/ckan/cli/sass.py b/ckan/cli/sass.py
  --- a/ckan/cli/sass.py
  +++ b/ckan/cli/sass.py
  @@ -11,21 +11,32 @@
   
   
   @click.command(
  -    name=u'sass',
  -    short_help=u'Compile all root sass documents into their CSS counterparts')
  -def sass():
  -    command = (u'npm', u'run', u'build')
  -
  -    public = config.get_value(u'ckan.base_public_folder')
  -
  -    root = os.path.join(os.path.dirname(__file__), u'..', public, u'base')
  +    name='sass',
  +    short_help='Compile all root sass documents into their CSS counterparts')
  +@click.option(
  +    '-d',
  +    '--debug',
  +    is_flag=True,
  +    help="Compile css with sourcemaps.")
  +def sass(debug: bool):
  +    command = ('npm', 'run', 'build')
  +
  +    public = config.get_value('ckan.base_public_folder')
  +
  +    root = os.path.join(os.path.dirname(__file__), '..', public, 'base')
       root = os.path.abspath(root)
  -    _compile_sass(root, command, u'main')
  -
  -
  -def _compile_sass(root: str, command: tuple[str, ...], color: str):
  -    click.echo(u'compile {}.css'.format(color))
  -    command = command + (u'--', u'--' + color)
  +    _compile_sass(root, command, 'main', debug)
  +
  +
  +def _compile_sass(
  +        root: str,
  +        command: tuple[str, ...],
  +        color: str,
  +        debug: bool):
  +    click.echo('compile {}.css'.format(color))
  +    command = command + ('--', '--' + color)
  +    if debug:
  +        command = command + ('--debug',)
   
       process = subprocess.Popen(
           command,
  
verification_info: {"golden_diff": "diff --git a/ckan/cli/sass.py b/ckan/cli/sass.py\n--- a/ckan/cli/sass.py\n+++ b/ckan/cli/sass.py\n@@ -11,21 +11,32 @@\n \n \n @click.command(\n-    name=u'sass',\n-    short_help=u'Compile all root sass documents into their CSS counterparts')\n-def sass():\n-    command = (u'npm', u'run', u'build')\n-\n-    public = config.get_value(u'ckan.base_public_folder')\n-\n-    root = os.path.join(os.path.dirname(__file__), u'..', public, u'base')\n+    name='sass',\n+    short_help='Compile all root sass documents into their CSS counterparts')\n+@click.option(\n+    '-d',\n+    '--debug',\n+    is_flag=True,\n+    help=\"Compile css with sourcemaps.\")\n+def sass(debug: bool):\n+    command = ('npm', 'run', 'build')\n+\n+    public = config.get_value('ckan.base_public_folder')\n+\n+    root = os.path.join(os.path.dirname(__file__), '..', public, 'base')\n     root = os.path.abspath(root)\n-    _compile_sass(root, command, u'main')\n-\n-\n-def _compile_sass(root: str, command: tuple[str, ...], color: str):\n-    click.echo(u'compile {}.css'.format(color))\n-    command = command + (u'--', u'--' + color)\n+    _compile_sass(root, command, 'main', debug)\n+\n+\n+def _compile_sass(\n+        root: str,\n+        command: tuple[str, ...],\n+        color: str,\n+        debug: bool):\n+    click.echo('compile {}.css'.format(color))\n+    command = command + ('--', '--' + color)\n+    if debug:\n+        command = command + ('--debug',)\n \n     process = subprocess.Popen(\n         command,\n", "issue": "White on Yellow?? Color Contrast\n**CKAN version**\r\nhttps://demo.ckan.org/en/user/edit/mgifford\r\n\r\n**Describe the bug**\r\nTitle: WCAG 1.4.3: Ensures the contrast between foreground and background colors meets WCAG 2 AA contrast ratio thresholds (.btn-warning)\r\nTags: Accessibility, WCAG 1.4.3, color-contrast\r\n\r\nIssue: Ensures the contrast between foreground and background colors meets WCAG 2 AA contrast ratio thresholds (color-contrast - https://accessibilityinsights.io/info-examples/web/color-contrast)\r\n\r\nTarget application: Manage - mgifford - Users - CKAN Demo - https://demo.ckan.org/en/user/edit/mgifford\r\n\r\nElement path: .btn-warning\r\n\r\nSnippet: <a class=\"btn btn-warning\" href=\"/en/user/generate_key/b8037a86-a216-4c9b-8211-e197fa09143a\" data-module=\"confirm-action\" data-module-content=\"Are you sure you want to regenerate the API key?\">Regenerate API Key</a>\r\n\r\nHow to fix: \r\nFix any of the following:\r\n  Element has insufficient color contrast of 1.94 (foreground color: #ffffff, background color: #f0ad4e, font size: 10.5pt (14px), font weight: bold). Expected contrast ratio of 4.5:1\r\n\r\nEnvironment: Microsoft Edge version 107.0.1418.35\r\n\r\n====\r\n\r\nThis accessibility issue was found using Accessibility Insights for Web 2.35.0 (axe-core 4.4.1), a tool that helps find and fix accessibility issues. Get more information & download this tool at http://aka.ms/AccessibilityInsights.\n", "before_files": [{"content": "# encoding: utf-8\nfrom __future__ import annotations\n\nimport subprocess\nimport os\n\nimport click\nimport six\n\nfrom ckan.common import config\n\n\n@click.command(\n    name=u'sass',\n    short_help=u'Compile all root sass documents into their CSS counterparts')\ndef sass():\n    command = (u'npm', u'run', u'build')\n\n    public = config.get_value(u'ckan.base_public_folder')\n\n    root = os.path.join(os.path.dirname(__file__), u'..', public, u'base')\n    root = os.path.abspath(root)\n    _compile_sass(root, command, u'main')\n\n\ndef _compile_sass(root: str, command: tuple[str, ...], color: str):\n    click.echo(u'compile {}.css'.format(color))\n    command = command + (u'--', u'--' + color)\n\n    process = subprocess.Popen(\n        command,\n        stdout=subprocess.PIPE,\n        stderr=subprocess.PIPE)\n    output = process.communicate()\n    for block in output:\n        click.echo(six.ensure_text(block))\n", "path": "ckan/cli/sass.py"}], "after_files": [{"content": "# encoding: utf-8\nfrom __future__ import annotations\n\nimport subprocess\nimport os\n\nimport click\nimport six\n\nfrom ckan.common import config\n\n\n@click.command(\n    name='sass',\n    short_help='Compile all root sass documents into their CSS counterparts')\n@click.option(\n    '-d',\n    '--debug',\n    is_flag=True,\n    help=\"Compile css with sourcemaps.\")\ndef sass(debug: bool):\n    command = ('npm', 'run', 'build')\n\n    public = config.get_value('ckan.base_public_folder')\n\n    root = os.path.join(os.path.dirname(__file__), '..', public, 'base')\n    root = os.path.abspath(root)\n    _compile_sass(root, command, 'main', debug)\n\n\ndef _compile_sass(\n        root: str,\n        command: tuple[str, ...],\n        color: str,\n        debug: bool):\n    click.echo('compile {}.css'.format(color))\n    command = command + ('--', '--' + color)\n    if debug:\n        command = command + ('--debug',)\n\n    process = subprocess.Popen(\n        command,\n        stdout=subprocess.PIPE,\n        stderr=subprocess.PIPE)\n    output = process.communicate()\n    for block in output:\n        click.echo(six.ensure_text(block))\n", "path": "ckan/cli/sass.py"}]}